How to End a Room in Game Makerby Dan Chruscinski ; Updated September 22, 2017
There comes a time in Game Maker when a player must move from his current location to the next world. Programmers do this by ending the room their user is exploring. Ending the room is accomplished by tying an action that pushes players onward to one of the room's events. When this happens, the room resets itself using the End Room event. The end of a room can be triggered by any number of events, from destruction to the countdown of a timer.
Select “Resources” from the Game Maker menu and choose the existing room you wish to end. Click on the room to open up the room-editing menu.
Choose the object in the room you wish to have trigger the end of the room. When the user interacts with this object, an instance will begin that will push players to the next room.
Select “Add Event” from the “Object Property” menu. A list of event categories will be displayed. Begin by selecting the event that will cause this room to end. For example, choose “Destroy Instance” to have the room end upon the destruction of the object.
Choose one of the room options from the list of actions that appears upon choosing the event. You can choose to have the user move on to the next room, restart the current room or return to the previous room. Select one to return to the “Object Property” menu.
Select “Add Event” again and choose “Other” from the event categories. Choose “End Room” for this menu. Ending the room will reset all instances and objects in case your user returns.
Save the room and test to ensure the ending has the desired effect.
You can add additional actions to the ending of a room. For example, when the player ends the room you, can have the user's sprite transform or shift color upon the start of the next room. Select the appropriate action from the “Action menu."