home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Level Design
/
GLDesign.bin
/
Software
/
UnrealEngine2Runtime
/
UE2Runtime-22262001_Demo.exe
/
Gameplay
/
Classes
/
ACTION_TeleportToPoint.uc
< prev
next >
Wrap
Text File
|
2003-12-11
|
639b
|
25 lines
class ACTION_TeleportToPoint extends LatentScriptedAction;
var(Action) name DestinationTag; // tag of destination - if none, then use the ScriptedSequence
var(Action) bool bPlaySpawnEffect;
var Actor Dest;
function bool InitActionFor(ScriptedController C)
{
local Pawn P;
Dest = C.SequenceScript.GetMoveTarget();
if ( DestinationTag != '' )
{
ForEach C.AllActors(class'Actor',Dest,DestinationTag)
break;
}
P = C.GetInstigator();
P.SetLocation(Dest.Location);
P.SetRotation(Dest.Rotation);
P.OldRotYaw = P.Rotation.Yaw;
if ( bPlaySpawnEffect )
P.PlayTeleportEffect(false,true);
return false;
}