rott/kf_sources/ScrnStoryGame/Classes/ACTION_MoveToEnemyTimed.uc
2026-07-14 20:27:09 +07:00

39 lines
661 B
Ucode

class ACTION_MoveToEnemyTimed extends LatentScriptedAction;
var(Action) float TimeLimit;
function bool MoveToGoal()
{
return true;
}
function Actor GetMoveTargetFor(ScriptedController C)
{
return C.Enemy;
}
function string GetActionString()
{
return ActionString@TimeLimit;
}
function bool InitActionFor(ScriptedController C)
{
if ( C.Enemy == none || C.Enemy.bDeleteMe || C.Enemy.Health <= 0 )
return false;
C.CurrentAction = self;
C.SetTimer(TimeLimit, false);
return true;
}
function bool CompleteWhenTimer()
{
return true;
}
defaultproperties
{
ActionString="Move to enemy or wait for timer"
}