Pausing Game

2»

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Now you have two Rules. That is not correct.

    The second one needs to be nested inside the first one like you had it before.

    Rule
    When all conditions are valid
    Actor receives event.touch.pressed
    -----Rule
    -----When all conditions are valid
    -----attribute game.GameIsPaused = false
    ----------Change Attribute game.GameIsPaused To: true
    -----Otherwise
    ----------Change Attribute game.GameIsPaused To: false
  • crapscraps Member Posts: 353
    I can not thank you enough - but what now - it does not work.

    http://i39.tinypic.com/2d8l09e.png
  • firemaplegamesfiremaplegames Member Posts: 3,211
    What happens when you click the button?

    Your pause button should have text on it that says "false" then "true" then "false"...

    Does it do that?
  • crapscraps Member Posts: 353
    NOTHING HAPPENS. The "display text" is outside and after the rules.

    In the text editor I used the drop down menu and typed true and false.
    Does it matter in the first rule that is states - game.GameIsPaused is false and not = false like you suggested?

    Could there be weird reason that this does not work - like the software itself - bug - something very simple that I should know but have not done.

    My Game attribute is GameIsPause - unchecked box - boolean.

    I can not thank you enough for your help.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Nothing is displayed on the Pause button? The text field is blank?

    just to confirm:

    the game.gameIsPaused in the Display Text is chosen from the drop-down menu?

    It's weird that it is not working.

    If you email me: joe at firemaplegames dot com, I will send you a sample working button
  • crapscraps Member Posts: 353
    Finally - Thank you firemaplegames for you help.

    I actually think I understand how things work now - at least with this aspect of GS.

    The pause button DOES pause the animation that I wanted BUT it resets to the first png file of the animation and restarts.

    Is there a way to pause the animation where it is when the pause button is pressed and restart where it left off?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    that might be tough. i don't know if you can stop/restart an animation midstream. i haven't tried yet.

    I don't think the Animation behavior is that flexible.

    You might need to use Timers instead of an animation behavior, something like this:

    Timer After 0.1
    Change Image to image 2

    Timer After 0.2
    Change Image to image 3

    Timer After 0.3
    Change Image to image 4

    I'm not even sure if that would work, but it would break the Animation into separate frames. It might give you more control.

    Not easy.
  • quantumsheepquantumsheep Member Posts: 8,188
    And while you're working your way through all that with the awesome FMG's help, may I humbly point you in this direction and ask that you 'like' the first post?

    http://gamesalad.com/forums/topic.php?id=5875

    Cheers!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • quantumsheepquantumsheep Member Posts: 8,188
    I'm getting suspicious that a lot of my 'Pause' related posts aren't appearing...

    Conspiracy theory anyone?

    QS :O

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.