Engine
Class RoundRobin

source: e:\games\UnrealTournament\Engine\Classes\RoundRobin.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Triggers
         |
         +--Engine.RoundRobin
Direct Known Subclasses:None

class RoundRobin
extends Engine.Triggers

//============================================================================= // RoundRobin: Each time it's triggered, it advances through a list of // outgoing events. //=============================================================================
Variables
 name OutEvents[16]
           Events to generate.
 bool bLoop
           Whether to loop when get to end.
 int i
           Internal counter.


Function Summary
 void Trigger(Actor Other, Pawn EventInstigator)
     
//
// When RoundRobin is triggered...
//



Source Code


00001	//=============================================================================
00002	// RoundRobin: Each time it's triggered, it advances through a list of
00003	// outgoing events.
00004	//=============================================================================
00005	class RoundRobin extends Triggers;
00006	
00007	var() name OutEvents[16]; // Events to generate.
00008	var() bool bLoop;         // Whether to loop when get to end.
00009	var int i;                // Internal counter.
00010	
00011	//
00012	// When RoundRobin is triggered...
00013	//
00014	function Trigger( actor Other, pawn EventInstigator )
00015	{
00016		local actor A;
00017		if( OutEvents[i] != '' )
00018		{
00019			foreach AllActors( class 'Actor', A, OutEvents[i] )		
00020			{
00021				A.Trigger( Self, EventInstigator );
00022			}
00023			if( ++i>=ArrayCount(OutEvents) || OutEvents[i]=='' )
00024			{
00025				if( bLoop ) i=0;
00026				else
00027					SetCollision(false,false,false);
00028			}
00029		}
00030	}
00031	
00032	defaultproperties
00033	{
00034	}

End Source Code