24 lines
482 B
Ucode
24 lines
482 B
Ucode
class ACTION_IfMyPlayerClose extends ScriptedAction;
|
|
|
|
var(Action) float MaxDistance;
|
|
|
|
function ProceedToNextAction( ScriptedController C )
|
|
{
|
|
local Pawn MyPlayer;
|
|
|
|
C.ActionNum += 1;
|
|
|
|
MyPlayer = C.GetMyPlayer();
|
|
if ( MyPlayer == none || vsize(MyPlayer.Location - C.Pawn.Location) > MaxDistance + C.Pawn.CollisionRadius + MyPlayer.CollisionRadius )
|
|
ProceedToSectionEnd( C );
|
|
}
|
|
|
|
function bool StartsSection()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
}
|