Windows Levels and map

R

Rezestick

Guest
Hello i'm trying to create levels and a map but i don't know how to do.. i made the background, a map looking like mario bros's one, but i'd like to change the room when a level is selected on the map. Can someone help me pls?
 
Last edited by a moderator:

Rob

Member
How about each "Level" on the map being an instance of an object ("obj_room", for example).

In your Map Room, you can change the creation code of each instance of obj_room that you place to set a variable so you know what room to go to when it's clicked.

e.g.

Code:
//Creation Code of obj_room
roomToWarpTo = rm_level_13;
Then when the player clicks on the level (or however you want them to interact with it) you can tell the game to warp to that particular instance's roomToWarpTo variable with room_goto.

You'll need to capture the id of the specific instance of obj_room that you click on. If you don't know how, do a little research on the difference between objects and instances and how to get an instance id.
 
R

Rezestick

Guest
How about each "Level" on the map being an instance of an object ("obj_room", for example).

In your Map Room, you can change the creation code of each instance of obj_room that you place to set a variable so you know what room to go to when it's clicked.

e.g.

Code:
//Creation Code of obj_room
roomToWarpTo = rm_level_13;
Then when the player clicks on the level (or however you want them to interact with it) you can tell the game to warp to that particular instance's roomToWarpTo variable with room_goto.

You'll need to capture the id of the specific instance of obj_room that you click on. If you don't know how, do a little research on the difference between objects and instances and how to get an instance id.
Thank you that will probably help me!
 
Top