How to make it so that gameplay resumes not instantly after unpause?
Zenith_Gameworks
Member Posts: 310
So in my game, the character is supposed to avoid falling objects and I can't figure out how to make them start falling again a few seconds after, not right away. I tried it with some attributes, and instead of only the spikes resuming falling, the whole game just unpauses after the amount of seconds I inputted. Please help
Comments
(if that is kind of what you mean)
I have an attribute (boolean) that is made true when I 'unpause' from a pause scene. This boolean can then trigger other actions.
So in my case I put a delay on the return to the 'game' scene (from the pause scene). This delay allows me to run some other things - in this case an animation to a dialog box before we leave the scene. This seems to me relevant to what you are trying to achieve???
You're better off making your own pause rules if you can. Have a boolean game.paused and then in each actor that can move wrap its other rules in a When attribute game.paused is false rule (or conversely, have the actor stop its velocity when game.paused is true... in that case, you have to store the current velocity and then restore it when game.paused is false). Then, don't use the built-in Pause/Unpause behaviors at all.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User