home *** CD-ROM | disk | FTP | other *** search
- //=============================================================================
- // DiscoTrigger.
- //=============================================================================
- class DiscoTrigger extends Triggers placeable;
-
- // # 1
- // Called when an actor touches a trigger
- function Touch( Actor Other )
- {
- // # 2
- // Create local storage for an Actor
- local Actor SomeActor;
- local TriggerLight SomeTriggerLight;
-
- // # 3
- // Iterate over all Actors in the level and only care about
- // the ones whose tag is set to the name of this trigger event
- //Find everything that is an actor
- //
- //A dynamic Actor object is one that can change
- //ForEach DynamicActors( class 'Actor', SomeActor, Event)
- //Event is the event that this trigger can process
- // This is set in the Event property of the TriggerLight class
- // This is under Events and is called DiscoLight
- ForEach DynamicActors( class 'TriggerLight', SomeTriggerLight, Event)
- // # 4
- // Trigger this actor
- SomeActor.Trigger(Other, Other.Instigator);
-
- // # 4
- // Note: we do not call Super.Touch(Other) here because we
- // are handling the trigger event ourself and that's all we
- // want to do
- }
-
- defaultproperties
- {
- }
-