F
FactorX12
Guest
Ok, so I am trying to make a platformer and I need to be able to switch between specified rooms that are set up like this:
r1_1
the first number being current level, the second number being which room of the current level player is in.
I tried doing this:
room_goto(r1_1); which worked fine.
so, I made a formatter that takes the current level and the desired room to go to within that level and joins it to that format, like this:
level = 1;
room = 1;
room_goto("r" + string(level) + "_" + string(room));
and it didn't switch. keep in mind, the room number is being increased/decreased right before the room switches, so it will go to the next room. I also tried outputting the returned string that it gives me like this:
show_message("r" + string(level) + "_" + string(room));
and it output:
r1_1. So, my question is, Am I doing something wrong or is it gamemaker? that formatter I made puts out the same thing that I typed in and it switched, but for some reason, if I use the formatter, it doesn't switch. I am very frustrated right now, so any help would be nice. tell me if something doesn't make sense and I will clear it up.
r1_1
the first number being current level, the second number being which room of the current level player is in.
I tried doing this:
room_goto(r1_1); which worked fine.
so, I made a formatter that takes the current level and the desired room to go to within that level and joins it to that format, like this:
level = 1;
room = 1;
room_goto("r" + string(level) + "_" + string(room));
and it didn't switch. keep in mind, the room number is being increased/decreased right before the room switches, so it will go to the next room. I also tried outputting the returned string that it gives me like this:
show_message("r" + string(level) + "_" + string(room));
and it output:
r1_1. So, my question is, Am I doing something wrong or is it gamemaker? that formatter I made puts out the same thing that I typed in and it switched, but for some reason, if I use the formatter, it doesn't switch. I am very frustrated right now, so any help would be nice. tell me if something doesn't make sense and I will clear it up.