A level editor is great for building rich, detailed environments but modern games require more for the levels to feel truly engaging. Have you ever played a game where the levels looked absorbingly stunning, but felt void of life? Levels must not only look pretty, they should feel dynamic, fluid and react to player actions.
Thats why for ElectoStatic I decided to implement a Trigger system. Triggers allow level editors to add fun and interesting functionality to a level. If you’ve ever used the Starcraft or Warcraft III editors, you probably already know what I’m talking about.
Trigger systems are great because they allow editors to move beyond simply placing sprites and objects into the game world. They allow editors to create dynamic ‘events’ and actions (E.g. “When the player enters an area, spawn enemies, lock a door and make lights flash” or “After the player kills 5 enemies, start a cutscene and open a door”). These type of actions though simple, can have an enormous impact on what a level feels like. Levels feel more like real worlds to play in; rather than just barren playgrounds to pass through.
In my system, a Trigger is a collection of Conditions and Actions. Once all of the conditions are met, the actions are performed in order.
Even with only a few Conditions and Actions, its easy to make lots happen. Since you can combine as many as these as you want, think of the possibilities with this set of conditions and actions:
Conditions
- Actor X enters area Y
- X Seconds have passed
- Actor X Kills Y Actors
- Actor X uses object Y
- Player has X Ys in their inventory
Actions
- Kill Actor X
- Spawn Actor/object Z at X, Y
- Move object/actor Z to/by X, Y
- Wait X seconds
- Unlock door X
You could make a trigger like:
Player enters trapRoom
Wait 2 seconds
Spawn turret at trapRoom
Spawn turret at trapRoomPlayer kills 2 turrets
Wait 1 seconds
Unlock door trapRoomDoor
Now a level editor, without typing a single line of code has made a room that when the player enters it, 2 turrets spawn and when the player kills them, the door unlocks. Pretty cool, eh?
If anyone would like me to do a short tutorial/explanation on how coded the trigger system, leave a message in the comments!




