Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UnrealShare.AttachMover


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
//=============================================================================
// AttachMover.
//=============================================================================
class AttachMover extends Mover;

// Allows attachment of actors to this mover, so that they will move
// as the mover moves, keeping their relative position to the mover.
// The relative positions are determined by the positions of the actors
// during the first keyframe (0) of the mover.
// The Tag of the actors and the AttachTag of this mover must be the same
// in order for actors to become attached.

var() name AttachTag;

// Immediately after mover enters gameplay.
function PostBeginPlay()
{
    local Actor Act;
    local Mover Mov;

    Super.PostBeginPlay();

    // Initialize all slaves.
    if ( AttachTag != '' )
        foreach AllActors( class 'Actor', Act, AttachTag )
        {
            Mov = Mover(Act);
            if (Mov == None) {

                Act.SetBase( Self );
            }
            else if (Mov.bSlave) {
            
                Mov.GotoState('');
                Mov.SetBase( Self );
            }
        }
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:00:12.000 - Creation time: za 22-4-2006 13:01:30.921 - Created with UnCodeX