GML Semi-Text RPG - Movement between rooms

E

Ellys

Guest
Hey, very new to GML (coding in general to be fair o_O) if anyone can shed some light on if i'm going horribly wrong with the way i'm trying to organise movement between rooms.

create tab -
counter = 0;

step tab -
if (counter == 0){
if mouse_check_button(mb_left)
{
if position_meeting(mouse_x, mouse_y, oSouth) {
room_goto(FirstArea);
oWest.counter = 0;
counter = 1;
}}}

Im coming into many issues when doing this (mainly its time consuming)
I've tried using a switch statement also but it's practially the same thing.

Explanation
I'm pressing one of four objects (North, East, South & West) to move from screen to screen. Im using the room_goto() function to change the room while keeping a counter. This counter is increased or decreased dependant on my room so i can move back and forth essentially creating a map. The oWest.counter is me altering the other object counter to remember where we move to next?
As there are going to be many intersections while moving rooms this means a hell of a lot of if/ switch statements.

Any help is greatly appreciated! :)

South.png north1.png west2.png
game.png
 
Top