Trigger Systems
Examples and the concepts behind making complex behaviour in a map with systems of triggers.
Timed Light
A light that is switched on by a player and switches itself off again after a set time. You will need:
- 1 (one) Trigger (in the style of Road Runner cartoons...)
- 1 Dispatcher
- 1 TriggerLight
Set the following tag sets:
- Tag1 to link Trigger's Event to Dispatcher's Tag (the Trigger calls the Dispatcher. Note that you could replace the Trigger with something else that can call an event, for example a Mover)
- Tag2 to link the Dispatcher's first 2 OutEvents (note... check property name!) to the TriggerLight's Tag.
Other settings:
- Set the Dispatcher's second OutDelay to the time you want the light to stay on.
- Set the TriggerLight's InitialState to TriggerToggle, so the second time the light is triggered it switches off.
- It may be a good idea to prevent the Trigger from being triggered while the light is on; ie set the ReTriggerDelay to a value larger than the Dispatcher's second OutDelay.
Looping system (dual dispatcher method)
This system triggers an event at a regular interval during the whole game. Seen in:
- DM-Hyperblast: the movement of the sky is a mover that is triggered, opens, closes, and is triggered again.
(maybe outline other uses for this)
The basic outline is this (diagram on the way...):
Initiator
An actor needs to fire off an event to start the looping process. If you want the loop to be initiated by players, a simple Trigger will do. If the looping system is required to run from the start of play, there are two methods:
- A single Trigger, with a collision cylinder large enough to encompass the entire map. This ensures that it will be activated by a spawning player.
- A TimedTrigger (UT), with bRepeating=false and DelaySeconds set to a small number, say 0.1 – this will activate almost immediately after play begins and then destroy itself.
Looping Mechanism
The iniator triggers a looping mechanism, made from two dispatchers, named D1 and D2 here. The loop time is the interval between each call of the main event. For example, a mover can be made to move continually and seamlessly by setting the loop time of this system to the same time as it takes to open and close. (or does it have to be marginally higher so the mover wakes up to triggering again?)
- D1 fires off the main event and D2 immediately
- D2 waits for the loop time, and then triggers D1
As an aside, it would be possible to create a Mover subclass that opens and closes continually.
Other Examples
- RoundRobin tutorial: Shoot One, Shoot Two, Shoot Three
- Lightning Storm