Cascading triggers

Outputs have time delays built into them. While it is possible to have one entity control a whole series of events with set time delays, it is often cumbersome to perfectly time everything. Let's say we want a light to turn on in the second room two seconds after the func_door entity is open. We could tell the trigger_once entity to have a second output that tells the light to turn on in about 2.5 seconds, (adding half a second for door travel time), or we can simply have the func_door entity turn on the light once it is fully open. A cascade occurs when an entity receives an input and triggers another entity via an output when its input action is complete.

Create a light in the second room and name it room02_light01. In the Flags tab of the light, select initially dark so it starts off and we need to tell the light to turn on.

Cascading triggers

Now open the Outputs tab of the func_door entity and add a new output. When the door is fully open, turn on the light in the next room after two seconds. Your output should look like the following:

OnFullyOpen, room02_light01, TurnOn, 2.00s delay

Hit Apply to save the changes, then give the map a test compile to check the results.

Cascading triggers

Our func_door entity has both the input and output icons in the bottom-left corner which means this entity has both inputs and outputs.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.240.196