home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Level Design
/
GLDesign.bin
/
Software
/
UnrealEngine2Runtime
/
UE2Runtime-22262001_Demo.exe
/
Engine
/
Classes
/
ZoneTrigger.uc
< prev
Wrap
Text File
|
2003-06-23
|
1KB
|
49 lines
//=============================================================================
// ZoneTrigger.
//=============================================================================
class ZoneTrigger extends Trigger;
//
// Called when something touches the trigger.
//
function Touch( actor Other )
{
local ZoneInfo Z;
if( IsRelevant( Other ) )
{
// Broadcast the Trigger message to all matching actors.
if( Event != '' )
foreach AllActors( class 'ZoneInfo', Z )
if ( Z.ZoneTag == Event )
Z.Trigger( Other, Other.Instigator );
if( Message != "" )
// Send a string message to the toucher.
Other.Instigator.ClientMessage( Message );
if( bTriggerOnceOnly )
// Ignore future touches.
SetCollision(False);
}
}
//
// When something untouches the trigger.
//
function UnTouch( actor Other )
{
local ZoneInfo Z;
if( IsRelevant( Other ) )
{
// Untrigger all matching actors.
if( Event != '' )
foreach AllActors( class 'ZoneInfo', Z )
if ( Z.ZoneTag == Event )
Z.UnTrigger( Other, Other.Instigator );
}
}
defaultproperties
{
}