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

  1. class ScriptedAction extends Object
  2.         abstract
  3.         hidecategories(Object)
  4.         collapsecategories
  5.         editinlinenew;
  6.  
  7. var localized string ActionString;
  8. var bool bValidForTrigger;
  9.  
  10. function bool InitActionFor(ScriptedController C)
  11. {
  12.     return false;
  13. }
  14.  
  15. function bool EndsSection()
  16. {
  17.     return false;
  18. }
  19.  
  20. function bool StartsSection()
  21. {
  22.     return false;
  23. }
  24.  
  25. function ScriptedSequence GetScript(ScriptedSequence S)
  26. {
  27.     return S;
  28. }
  29.  
  30. function ProceedToNextAction(ScriptedController C)
  31. {
  32.     C.ActionNum += 1;
  33. }
  34.  
  35. function ProceedToSectionEnd(ScriptedController C)
  36. {
  37.     local int Nesting;
  38.     local ScriptedAction A;
  39.  
  40.     While ( C.ActionNum < C.SequenceScript.Actions.Length )
  41.     {
  42.         A = C.SequenceScript.Actions[C.ActionNum];
  43.         if ( A.StartsSection() )
  44.             Nesting++;
  45.         else if ( A.EndsSection() )
  46.         {
  47.             Nesting--;
  48.             if ( Nesting < 0 )
  49.                 return;
  50.         }
  51.         C.ActionNum += 1;
  52.     }
  53. }
  54.  
  55. function string GetActionString()
  56. {
  57.     return ActionString;
  58. }
  59.  
  60. defaultproperties
  61. {
  62.     ActionString="unspecified action"
  63.     bValidForTrigger=true
  64. }