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

Unknown Room changing errors

So I have an error with some code and I have no idea why. So I have to objects that have various keyboard events. They usually work. They both change the room. One object changes the room to room10 if the B key is pressed. The other, persistent object, has a B keyboard_check function but only in the room10, which shouldn't matter because the first object is not persistent. Weirdly enough, if I start the game, I can press the various other buttons to go to the other rooms, but if I press B, nothing happens and then I have to reset the game to be able to do anything else. However, if I change the persistent object to make it not persistent, the other object will change the room to room10, but then I can't do anything in room10. Even though I put the now non persistent object in room10, so it should be able to work. I'm confused
 

TheouAegis

Member
We are confused too because you didn't post any code. I had an answer but then I saw that you you were saying you could push any other key except for B, which is odd
 
Yeah, I haven't posted any code because it's long and I'm not entirely certain what the problem is. But I think it may have to do with the same keys being bound to the same buttons, which is strange since the objects initially were in different rooms and then when I put the other one in the same room and changed it to be persistent and the code to only trigger if in a certain room, it still seems odd. I'm going to try a few more things, I think I may be able to get it to work
 

TheouAegis

Member
If you use the events, then you're kinda screwed. If you use keyboard_check_pressed(ord("B")) then you can call io_clear() to clear the keyboard state until the next step.
 
Top