My program doesn't have bugs. It just develops random features.

Legacy:Trigger Systems (UT)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

This page is reserved for concepts behind and examples of complex behaviour using systems of Triggers or other actors capable of triggering Events. There are large differences in the available Trigger classes between UT and UT200x.

For the UT200x version of this page, see Trigger Systems.

Timed Light[edit]

A light that is switched on by a player and switches itself off again after a set time. You will need:

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.
Legacy triggermachine.timedlight.gif

Looping system (dual dispatcher method)[edit]

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.

(The basic outline is needed.)

Initiator[edit]

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[edit]

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[edit]

Related Topics[edit]

Discussion[edit]