Windows room transition

Eagle-1

Member
hello, i would like help with a problem. I created this simple room transition system, however when I do the procedure to change rooms the game simply crashes, could someone give a hint.


GML:
if place_meeting(x, y, player_1) && keyboard_check(ord("F")){



    room_goto(target)

    player_1.x = targetX;

    player_1.y = targetY;

  

}
 

TsukaYuriko

☄️
Forum Staff
Moderator
That's not a crash message (and not a massage either).

When you trigger the transition, exactly what happens? The game window closes? The game throws an error message? The game window freezes? It's important to make a distinction there.
 

Eagle-1

Member
That's not a crash message (and not a massage either).

When you trigger the transition, exactly what happens? The game window closes? The game throws an error message? The game window freezes? It's important to make a distinction there.
the game window simply crashes, nothing moves, no message appears.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Crashes with no error message at all are not something that should be happening.

Try the usual troubleshooting steps of fixing broken projects, to either unbreak it or find out that yours isn't broken:
- Make a backup so you don't break the project further.
- Clear the asset cache (Ctrl+F7). Does the issue still occur?
- Export the game as a yyz and import it back. Does the issue still occur?

If still yes, place a breakpoint at the room_goto line and play the game until the code stops at this line. Step through your code line by line. At which point does the game crash? Which code runs when the game crashes?
 

Eagle-1

Member
ok, the game is not completely locked, the commands to go back to the menu (esc) or move to the next room (f) still work, and when I go to the menu the game automatically unlocks, but when I return to the game the command doesn't is executed and the character remains in the same place without having advanced to the next room
 

TsukaYuriko

☄️
Forum Staff
Moderator
So it's neither crashing nor freezing? Quick recap, crash means game process goes poof, freeze means game process is not responding to user input and not displaying visual updates (but no poof).

Do you, by any chance, have another set of teleporters in the room you're teleporting to? If so, remove them and try this again. Does the game still do whatever it is that you don't want it to do? If so, you're probably sending your player back and forth between rooms constantly.
 

Eagle-1

Member
So it's neither crashing nor freezing? Quick recap, crash means game process goes poof, freeze means game process is not responding to user input and not displaying visual updates (but no poof).

Do you, by any chance, have another set of teleporters in the room you're teleporting to? If so, remove them and try this again. Does the game still do whatever it is that you don't want it to do? If so, you're probably sending your player back and forth between rooms constantly.
nor one neither the other.
 

chamaeleon

Member
On the line of code that takes you back to the game room, set a breakpoint, start the debugger, play the game until you experience the issue at which point you should be able to single step through lines of code to see what gets executed upon the return to the game. Keep an eye out for anything unexpected. Inspect state variables in the player object or whatever controls movement. Check global variables, and anything else that might be helpful.
 
Top