How to make it so that gameplay resumes not instantly after unpause?

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

  • lycettebroslycettebros Member, PRO Posts: 1,598
    edited February 2013
    I seem to remember using a boolean triggered by the pause or unpause state working for me on a project. I'd have to dig it up but I seem to think I could check it and change an attribute etc. based on the boolean having been triggered.

    (if that is kind of what you mean)
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Sorry, but can you be more specific?
  • lycettebroslycettebros Member, PRO Posts: 1,598
    @GameGod96
    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???
  • GS_MasterGS_Master Member Posts: 159
    make a rule when touch is pressed timer after 3 seconds unpause.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    @GS_Master pretty sure @GameGod96 wants only the falling objects to pause for a few extra seconds, not everything on the scene.

    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

Sign In or Register to comment.