Engine
Class ZoneTrigger

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

class ZoneTrigger
extends Engine.Trigger

//============================================================================= // ZoneTrigger. //=============================================================================

Function Summary
 void Touch(Actor Other)
     
//
// Called when something touches the trigger.
//
 void UnTouch(Actor Other)
     
//
// When something untouches the trigger.
//



Source Code


00001	//=============================================================================
00002	// ZoneTrigger.
00003	//=============================================================================
00004	class ZoneTrigger extends Trigger;
00005	
00006	//
00007	// Called when something touches the trigger.
00008	//
00009	function Touch( actor Other )
00010	{
00011		local ZoneInfo Z;
00012		if( IsRelevant( Other ) )
00013		{
00014			// Broadcast the Trigger message to all matching actors.
00015			if( Event != '' )
00016				foreach AllActors( class 'ZoneInfo', Z )
00017					if ( Z.ZoneTag == Event )
00018						Z.Trigger( Other, Other.Instigator );
00019	
00020			if( Message != "" )
00021				// Send a string message to the toucher.
00022				Other.Instigator.ClientMessage( Message );
00023	
00024			if( bTriggerOnceOnly )
00025				// Ignore future touches.
00026				SetCollision(False);
00027		}
00028	}
00029	
00030	//
00031	// When something untouches the trigger.
00032	//
00033	function UnTouch( actor Other )
00034	{
00035		local ZoneInfo Z;
00036		if( IsRelevant( Other ) )
00037		{
00038			// Untrigger all matching actors.
00039			if( Event != '' )
00040				foreach AllActors( class 'ZoneInfo', Z )
00041					if ( Z.ZoneTag == Event )
00042						Z.UnTrigger( Other, Other.Instigator );
00043		}
00044	}
00045	
00046	defaultproperties
00047	{
00048	}

End Source Code