RuneI
Class AttachPolyobj

source: c:\runehov\RuneI\Classes\AttachPolyobj.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Brush
         |
         +--Engine.Polyobj
            |
            +--RuneI.RunePolyobj
               |
               +--RuneI.AttachPolyobj
Direct Known Subclasses:None

class AttachPolyobj
extends RuneI.RunePolyobj

//============================================================================= // AttachPolyobj. //=============================================================================
Variables
 name AttachTag


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



Source Code


00001	//=============================================================================
00002	// AttachPolyobj.
00003	//=============================================================================
00004	class AttachPolyobj extends RunePolyobj;
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 Polyobj P;
00020	
00021		Super.PostBeginPlay();
00022	
00023		// Initialize all slaves.
00024		if ( AttachTag != '' )
00025			foreach AllActors( class 'Actor', Act, AttachTag )
00026			{
00027				P = Polyobj(Act);
00028				if (P == None)
00029				{
00030					Act.SetBase( Self );
00031				}
00032				else if (P.bSlave)
00033				{
00034					P.GotoState('');
00035					P.SetBase( Self );
00036				}
00037			}
00038	}
00039	
00040	defaultproperties
00041	{
00042	}

End Source Code