Book Image

Source SDK Game Development Essentials

By : Brett Joseph Bernier
Book Image

Source SDK Game Development Essentials

By: Brett Joseph Bernier

Overview of this book

Table of Contents (18 chapters)
Source SDK Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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.

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...