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

Automatic triggers


If you want something to happen as soon as you start a map, or as soon as you load from a save file, there is an entity for that. The logic_auto entity fires an output based on level start conditions.

In this case, I have surrounded the player start with a func_door entity in the shape of a cage. I have set an output in the logic_auto to open the door (lower the cage into the floor) after the map has been loaded for five seconds. The output is as follows:

OnMapSpawn, cage01, Open, 5.00s delay