Sub-events appear indented beneath other events. They carry on picking instances from where the "parent" event left off. They run after the parent event's actions have finished. An example is below.
This event runs like so:
In other words, monsters hurt the player when they touch, unless the player has ShieldEnabled in which case the monsters are hurt instead.
This works because the objects picked by the top event are remembered and also used for sub-events. If the second and third events were not sub-events (not appearing indented) the second event would subtract 1 from the health of all Monsters, because it was not referenced in the event. (See Unreferenced objects in How events work for more on this.)
Sub-events can have other sub-events too, which makes sub-events very powerful and flexible for setting up advanced game logic.
Note sub-events run after the actions only if the actions run - in the above example, if no monsters are overlapping the player, neither the actions of that event nor its sub-events run at all.
If a trigger is in a sub-event all of its parent event's conditions must be true at the time the trigger fires, otherwise the event will not run.
There can also only be one trigger in a single branch of sub-events. In other words, one of the events above a trigger cannot also contain a trigger.
To add a sub-event, right-click the event margin and choose Add sub-event. Alternatively use the Events tab on the ribbon, or press the S keyboard shortcut.
Adding and editing conditions to sub-events works identically to ordinary events. You can also create more deeply nested sub-events by adding a sub-event to a sub-event.
To delete a sub-event, select it by clicking in the event margin, and press Delete.