• 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!

Legacy GM Need help disabling certain code in certain room

E

EZTALES

Guest
hey yall,
I have a pause menu in my player stats object but I do not want to be able to pause the game in four rooms throughout the whole game. I have tried fixing this bug but it seems to do nothing. code is down below in the step event any help helps. thanks! PS i do not want the pause event in another object.
Code:
//pause the game
if (room != rm_test_3 or room != rm_test_attack
or room != rm_test_rage or room != rm_test_heal)
{
if (obj_input.pause_key) {
    if ( room != rm_pause) {
       if (instance_exists(obj_player)) {
       obj_player.persistent = false;
      }
      previous_room = room;
      room_persistent = true;
      room_goto(rm_pause);
   } else {
   room_start_action = RETURN;
   room_goto(previous_room);
   }
   obj_input.pause_key = false;
}
}
 
Top