home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / Gameplay / Classes / ACTION_MoveToPoint.uc < prev    next >
Text File  |  2003-12-11  |  782b  |  37 lines

  1. class ACTION_MoveToPoint extends LatentScriptedAction;
  2.  
  3. var(Action) name DestinationTag;    // tag of destination - if none, then use the ScriptedSequence
  4. var Actor Movetarget;
  5.  
  6. function bool MoveToGoal()
  7. {
  8.     return true;
  9. }
  10.  
  11. function Actor GetMoveTargetFor(ScriptedController C)
  12. {
  13.     if ( Movetarget != None )
  14.         return MoveTarget;
  15.  
  16.     MoveTarget = C.SequenceScript.GetMoveTarget();
  17.     if ( DestinationTag != '' )
  18.     {
  19.         ForEach C.AllActors(class'Actor',MoveTarget,DestinationTag)
  20.             break;
  21.     }
  22.     if ( AIScript(MoveTarget) != None )
  23.         MoveTarget = AIScript(MoveTarget).GetMoveTarget();
  24.     return MoveTarget;
  25. }
  26.  
  27.  
  28. function string GetActionString()
  29. {
  30.     return ActionString@DestinationTag;
  31. }
  32.  
  33. defaultproperties
  34. {
  35.     ActionString="Move to point"
  36.     bValidForTrigger=false
  37. }