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

Persistent Room, Cannot Control Player Character

W

weirdkid5

Guest
So I am currently making a survival-horror styled game and I do not want my enemies to reset every single time I reenter a room. Seems like the obvious choice would be to make the rooms persistent, but for some reason, all control of my player is lost upon reentering a persistent room.

Anyone have a pointer? Thank you!
 

TheSpydog

Member
Hard to say -- it depends on how your player object and any control objects are set up. It might be your best bet to just put a bunch of show_debug_message() calls into your player code to see exactly what is going on.
 

samspade

Member
So I am currently making a survival-horror styled game and I do not want my enemies to reset every single time I reenter a room. Seems like the obvious choice would be to make the rooms persistent, but for some reason, all control of my player is lost upon reentering a persistent room.

Anyone have a pointer? Thank you!
Personally, I would recommend that you develop a 'save' system instead of using a persistent room. It will be necessary in the long run, unless you don't want people to be able to save the game, and give you more control.

However, a persistent room in and of itself shouldn't cause your problem. You haven't really provided enough to say what is, but if I were to guess I would guess that either (a) your player controller isn't persistent, and those doesn't transfer between rooms or (b) you are perhaps transferring some objects and then getting duplicates that interfere with each other.

If you're using GMS 2 I would recommend the debugger, as I think it would be better for this type of problem. However, show_debug_message is also a good idea, nd if you're not familiar with it this may help: Using show_debug_message.
 
Top