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

32 lines
549 B
Ucode

class ACTION_WaitForTimerRandom extends LatentScriptedAction;
var(Action) float MinTime;
var(Action) float MaxTime;
function bool InitActionFor(ScriptedController C)
{
C.CurrentAction = self;
C.SetTimer(MinTime + frand()*(MaxTime-MinTime), false);
return true;
}
function bool CompleteWhenTriggered()
{
return true;
}
function bool CompleteWhenTimer()
{
return true;
}
function string GetActionString()
{
return ActionString@MinTime$".."$MaxTime;
}
defaultproperties
{
ActionString="Wait for timer"
}