Order of events

When your game runs, it's run in a specific order of events, certain events run before other events and it's worth knowing in which order they are. Here is that order, from start to finish. All tests done in GM6.1 (Registered, Advanced Mode).

Game Started

 * Room - Instance Creation Code
 * Object - Create
 * Object - Game Start
 * Room - Creation code
 * Room - Room Start
 * Object - Room Start
 * Draw

Normal Step

 * Create Event (once)
 * Begin Step
 * Alarm 0
 * Keyboard and mouse
 * Keyboard and mouse press
 * Keyboard and mouse release
 * Step
 * End Of Path
 * Outside room
 * Intersect Boundary
 * Collision events*
 * End Step
 * Draw
 * Animation End**

Game Closed

 * Room End
 * Game End

Room Change***

 * Room End
 * Instance Creation Code (Only if object is not persistent from previous room)
 * Create (Only if object is not persistent from previous room)
 * Room - Creation code
 * Room Start
 * Draw

Other Events

 * User Defined Events - Executed at call; doesn't wait for current event, or any other ones, to finish.
 * Out of Health - Executed the moment they run out; doesn't wait for current event, or any other ones, to finish.
 * Out of Lives - Same as Out Of Health
 * Destroy – Will immediately execute when the object gets destroyed. Will not execute at the end of the game or at a room transition.