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

  1. //=============================================================================
  2. // ScriptedTriggerController
  3. // used for playing ScriptedTrigger scripts
  4. // A ScriptedTriggerController never has a pawn
  5. //=============================================================================
  6. class ScriptedTriggerController extends ScriptedController;
  7.  
  8. function InitializeFor(ScriptedTrigger T)
  9. {
  10.     SequenceScript = T;
  11.     ActionNum = 0;
  12.     SequenceScript.SetActions(self);
  13.     GotoState('Scripting');
  14. }
  15.  
  16. function GameHasEnded() {}
  17. function ClientGameEnded() {}
  18.  
  19. function DestroyPawn()
  20. {
  21.     if ( Instigator != None )
  22.         Instigator.Destroy();
  23. }
  24.  
  25. function ClearAnimation() {}
  26.  
  27. function SetNewScript(ScriptedSequence NewScript)
  28. {
  29.     SequenceScript = NewScript;
  30.     ActionNum = 0;
  31.     Focus = None;
  32.     SequenceScript.SetActions(self);
  33. }
  34.  
  35. state Scripting
  36. {
  37.     function Trigger( actor Other, pawn EventInstigator )
  38.     {
  39.         Instigator = EventInstigator;
  40.         Super.Trigger(Other,EventInstigator);
  41.     }
  42.  
  43.     function LeaveScripting()
  44.     {
  45.         Destroy();
  46.     }
  47.  
  48. Begin:
  49.     InitforNextAction();
  50.     if ( bBroken )
  51.         GotoState('Broken');
  52.     if ( CurrentAction.TickedAction() )
  53.         enable('Tick');
  54. }
  55.  
  56. // Broken scripted sequence - for debugging
  57. State Broken
  58. {
  59. Begin:
  60.     warn(" Trigger Scripted Sequence BROKEN "$SequenceScript$" ACTION "$CurrentAction);
  61. }