Resume button not working properly

Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

Hi everyone, Thor speaking.

I have a resume button after i pause the game. But when i press resume my actor jumps up after. Which i don't want to happen.
This is because i have a rule that when the screen is pressed my actor jumps.

So how would i do it so when i press the resume button my actor doesn't jump.

Thankyou.

Thor.

Comments

  • SummationSummation Member, PRO Posts: 476

    @thor Create an attribute called paused.
    Set your screen swipe to fire only when game.paused=0
    If your game is paused, set game.paused=1
    When you press the resume (unpause) button, make sure to set game.paused=0 just before the Unpause Game behavior.

  • LovejoyLovejoy Member Posts: 2,078

    @Thor Make the resume button a touch is released, that way it will only unpause when your finger is already up and not activate the jump.

    Fortuna Infortuna Forti Una

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    Thankyou Lovejoy and summation. :smile:

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @tatiang
    Hi tatiang, have you got any ideas on what i could do for this, because i can't seem to get it work.

    Thanks.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @tatiang

    Im really stuck on this, this is pretty much the last thing i need to do.

    Thanks.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    Anyone?

  • LovejoyLovejoy Member Posts: 2,078
    edited April 2015

    @Thor said:
    Anyone?

    Did you try the suggestions above?

    If you did and its still happening then the jump is activated right before the game pauses. So to fix it you need to make the pause button area not activate the jump. So whatever actor you have to activate touch, make it smaller so it doesn't go over the pause button.

    Fortuna Infortuna Forti Una

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168
    edited April 2015

    @Lovejoy said:
    If you did and its still happening then the jump is activated right before the game pauses. So to fix it you need to make the pause button area not activate the jump. So whatever actor you have to activate touch, make it smaller so it doesn't go over the pause button.

    I have a game.touch.count, so that wouldn't work, and yes i did try the suggestions.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Here's a demo. Note that the order of the actors on the layer does make a difference. Re-order them and it won't work.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @tatiang said:
    Here's a demo. Note that the order of the actors on the layer does make a difference. Re-order them and it won't work.

    Hi tatiang, i have just tried your demo, and it doesn't seem to be working.

    Any ideas of why it might not be working?

    Thanks.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168
    edited April 2015

    @tatiang said:
    Here's a demo. Note that the order of the actors on the layer does make a difference. Re-order them and it won't work.

    Any ideas on a different way i can do it?

    Thanks.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @tatiang said:
    Here's a demo. Note that the order of the actors on the layer does make a difference. Re-order them and it won't work.

    When i press the pause button it works, however when i press the resume button my actor still moves.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    I have just tried it in a blank project and its working. But in my project its not, is there something wrong with my project?

    Thanks.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    Anyone?

  • SummationSummation Member, PRO Posts: 476

    @Thor said:
    Anyone?

    It would seem that the only logical conclusion is that your project has a conflicting rule, if the demo works in a blank project.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168
    edited April 2015

    @Summation said:
    It would seem that the only logical conclusion is that your project has a conflicting rule, if the demo works in a blank project.

    But then why is it that, when I take about the pause touch rules. So that when I pause it the actor doesn't move. It still works when the rules are out.
    So when I pause the game, the actor doesn't move, but when I resume the game the actor moves.

  • SummationSummation Member, PRO Posts: 476
    edited April 2015

    @Thor said:
    But then why is it that, when I take about the pause touch rules. So that when I pause it the actor doesn't move. It still works when the rules are out.

    We won't know without being able to look at your rules.

Sign In or Register to comment.