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

  1. //=============================================================================
  2. // RoundRobin: Each time it's triggered, it advances through a list of
  3. // outgoing events.
  4. // OBSOLETE - superceded by ScriptedTrigger
  5. //=============================================================================
  6. class RoundRobin extends Triggers
  7.     notplaceable;
  8.  
  9. var() name OutEvents[16]; // Events to generate.
  10. var() bool bLoop;         // Whether to loop when get to end.
  11. var int i;                // Internal counter.
  12.  
  13. //
  14. // When RoundRobin is triggered...
  15. //
  16. function Trigger( actor Other, pawn EventInstigator )
  17. {
  18.     TriggerEvent(OutEvents[i],self,EventInstigator);
  19.     i++;
  20.     if ( i>=ArrayCount(OutEvents) || (OutEvents[i]=='') || (OutEvents[i]=='None') )
  21.     {
  22.         if( bLoop ) 
  23.             i=0;
  24.         else
  25.             SetCollision(false,false,false);
  26.     }
  27.  
  28. }
  29.  
  30. defaultproperties
  31. {
  32.     bObsolete=true
  33. }
  34.