Scripted events
One common and design wise, important element of most games is scripted events. In game development, we refer to events that are singular situations or usually happen unexpectedly to help reduce gameplay repetitiveness, as scripted events. When games lack scripted events, they usually end up being stale and eventually very predictable. To really involve the player in your game or level, it's important that you always provide variations and exciting, unique moments to motivate your player to keep playing.
Scripted events can be just about anything! They can be as simple as an enemy suddenly bursting through a door or being dropped from a helicopter. They can also be complex events, such as an entire level being changed by the sudden collapse of a bridge or the explosion of a building, changing the course of the story or even the gameplay.
In the rest of the chapter, we will use the Flow Graph visual scripting tool within Sandbox to create a series of useful scripted events and...