Zuljaras
Member
Hello,
I have written about this in the Programming section first but now I believe that this is a BUG about GMS2.
I have an object that will make my current room persistent, deactivate all objects except itself and then go to the pause menu room.
The problem is that after I click on the button assigned to to this action the game freezes and in the task manager GMS2 is "Not Responding".
Here is the code:
Things to NOTE!
- If I remove room_persistent=true; the game does NOT freeze but after I return the main character is gone because he is in the first room of the game. It is not good!
- If I remove instance_deactivate_all(true); the game does NOT freeze but ALL my persistent objects are moving to my pausemenu room which is not good!!!
One major thing is that in GMS2 BETA this was working perfectly!!!
I have written about this in the Programming section first but now I believe that this is a BUG about GMS2.
I have an object that will make my current room persistent, deactivate all objects except itself and then go to the pause menu room.
The problem is that after I click on the button assigned to to this action the game freezes and in the task manager GMS2 is "Not Responding".
Here is the code:
Code:
if keyboard_check_pressed(global.KeyDefault[6])
{if instance_exists(playero)
{
if global.paused=false
{
instance_deactivate_all(true);
global.lastroom=room;
room_persistent=true;
room_goto(pausemenu);
}
}
}
- If I remove room_persistent=true; the game does NOT freeze but after I return the main character is gone because he is in the first room of the game. It is not good!
- If I remove instance_deactivate_all(true); the game does NOT freeze but ALL my persistent objects are moving to my pausemenu room which is not good!!!
One major thing is that in GMS2 BETA this was working perfectly!!!