Game Development Reference
In-Depth Information
Creating a trigger system
Almost all story-driven games require some kind of system to trigger some sort of event for
example, dialogs, enemies, or doors opening. Unless the game is very small, you generally
don't want to hardcode these. The following recipe will describe a trigger system, which
can be used for almost any type of game from FPSs to RTSs and RPGs.
We'll start out by laying the ground work with an AppState controlling all the script objects
and the basic functionality of a Trigger class. Then, we'll look into how to actually ac-
tivate the trigger and use it for something.
Search WWH ::




Custom Search