I have a pause button, that does nothing but pause the game, and a button that unpauses the game. Whenever i pause and unpause the game, my game doesnt work correctly. Any have a solution or similar problem?
Sorry the video was too small to really see whats going on but if you can explain?
Make sure the "unpause" button is on the scene that the pause button takes you - if there are no other conditions other than pause and unpause there really shouldnt be any problems.
When you say "my game doesnt work correctly" what part of it is messing up after you unpause
Ok so when you mean pause do you mean the potion selection screen? and when you return it doesn't control?
When you click on the spider, you attack it. When spiders hp is 0, it drops a random object and 5 second later another spider spawns. But if you click on the potion icon it pauses the game and brings you to the potion screen, wheres theres a button that unpauses the game.
If you click the potion(pause) button after you kill the spider but before it respawns, the spider will spawn without its healthbar, when you click on it, you wont attack it, and if you walk into the spider it flys off the screen, even though its unmovable. also you wont be able to click anything after you run into it.
Is the pause screen interfering with my timer perhaps?
Wow cool RPG in the making... i think all your actors need to check for pause or unpause attribute before doing anything so that you won't have things spawning even when paused. I had that problem too, when paused enemy still moving. so have the enemies check for pause attribute, if pause is true , change spawn to false. I think because it's a pause scene feature not pause game, so anything that is running on global attribute seems to be running still if you dun deactivate it during pause.
Comments
took a while, but here it is
Make sure the "unpause" button is on the scene that the pause button takes you - if there are no other conditions other than pause and unpause there really shouldnt be any problems.
When you say "my game doesnt work correctly" what part of it is messing up after you unpause
Ok so when you mean pause do you mean the potion selection screen? and when you return it doesn't control?
If you click the potion(pause) button after you kill the spider but before it respawns, the spider will spawn without its healthbar, when you click on it, you wont attack it, and if you walk into the spider it flys off the screen, even though its unmovable. also you wont be able to click anything after you run into it.
Is the pause screen interfering with my timer perhaps?