|
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 well to know in which order they are. Here is that order, from start to finish. All tests done in GM6.1 (Registered, Advanced Mode).
Events List
Game started:
Normal step:
Game closed:
Room Change ***:
Other Events:
Event Comments: * - If the collision event is only in one object: Object(with event) - Collision with other object
If the collision event is in both objects: Object1 - Collision with Object2 Object2 - Collision with Object1 Object2 - Collision with Object1 Object1 - Collision with Object2
** - Will execute once if sprite is animated (when it ends). Will execute every step with single image sprite or no sprite.
*** - Doesn’t wait for rest of the events to finish, will execute immediately and then continue from the start of “Normal Step”.
Order of Above Events
Order of sub-events: The above groups of events will run in the game in the following order:
Game started Normal step Normal step Normal step Normal step (Continues to repeat) Room Change (When called) Normal step Normal step Normal step (Continues to repeat) Game closed (When called)
Events with multiple objects: With multiple objects, the events alternate: Object1 – Step Object2 - Step Object1 - End Of Path Object2 - End Of Path Object1 - Outside room Object2 - Outside room Object1 - Intersect Boundary Object2 - Intersect Boundary
The order the objects are handled is determined by depth (lower numbers execute first) and then, for objects at the same depth, by the order they were created (placed in the room, first placed will execute first).
Tahnok100 - Revision #1 |