• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[SOLVED]Things after room_goto()

John Andrews

Living Enigma
I just wanted to know if things put after room_goto() in a code are done, for example:

Code:
if keyboard_check(any)
{
     room_goto(room1);
     global.room++;
}
would that make the global variable "room" augment everytime I press any key?

ALSO

If it is not possible, the is there a non-conventional way to do this? I really need to do that in my game thanks a lot! :D
 
Last edited:

Perseus

Not Medusa
Forum Staff
Moderator
Yes. Execution of room_goto doesn't mean that the code put afterwards doesn't get executed. You move to the specified room only after everything gets executed. If you want to stop that from happening, you need to call exit right after calling room_goto.
 

John Andrews

Living Enigma
Yes. Execution of room_goto doesn't mean that the code put afterwards doesn't get executed. You move to the specified room only after everything gets executed. If you want to stop that from happening, you need to call exit right after calling room_goto.
lol after trying I figured out it is possible :p

Yeah thank you for the reply btw :)
 
Top