UnrealShare
Class AttachMover

source: e:\games\UnrealTournament\UnrealShare\Classes\AttachMover.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Brush
         |
         +--Engine.Mover
            |
            +--UnrealShare.AttachMover
Direct Known Subclasses:None

class AttachMover
extends Engine.Mover

//============================================================================= // AttachMover. //=============================================================================
Variables
 name AttachTag


Function Summary
 void PostBeginPlay()
     
// Immediately after mover enters gameplay.



Source Code


00001	//=============================================================================
00002	// AttachMover.
00003	//=============================================================================
00004	class AttachMover extends Mover;
00005	
00006	// Allows attachment of actors to this mover, so that they will move
00007	// as the mover moves, keeping their relative position to the mover.
00008	// The relative positions are determined by the positions of the actors
00009	// during the first keyframe (0) of the mover.
00010	// The Tag of the actors and the AttachTag of this mover must be the same
00011	// in order for actors to become attached.
00012	
00013	var() name AttachTag;
00014	
00015	// Immediately after mover enters gameplay.
00016	function PostBeginPlay()
00017	{
00018		local Actor Act;
00019		local Mover Mov;
00020	
00021		Super.PostBeginPlay();
00022	
00023		// Initialize all slaves.
00024		if ( AttachTag != '' )
00025			foreach AllActors( class 'Actor', Act, AttachTag )
00026			{
00027				Mov = Mover(Act);
00028				if (Mov == None) {
00029	
00030					Act.SetBase( Self );
00031				}
00032				else if (Mov.bSlave) {
00033				
00034					Mov.GotoState('');
00035					Mov.SetBase( Self );
00036				}
00037			}
00038	}
00039	
00040	defaultproperties
00041	{
00042	}

End Source Code