Pausing the game

OkyshoOkysho Member Posts: 158
edited November -1 in Working with GS (Mac)
oh boy do I feel silly. Well with the addition of the new pause function I figured it'd be a good idea to go ahead and add the new easy function to my game. Well I can get it to pause the game, now how do I get it to unpause?

T.T

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you have to put a button on your pause screen that uses the unpause behavior. :)
  • OkyshoOkysho Member Posts: 158
    tenrdrmer said:
    you have to put a button on your pause screen that uses the unpause behavior. :)

    Hey tenrdrmer, That's what I figured, but for some reason it didn't work. My bahaviours are as follows:

    (in main actor) if P is pressed and pause is false, change pause to true pause game <pause scene>

    (on a blank actor on pause screen) if P is pressed and pause is true, change pause to false and unpause

    This doesn't seem to work however... I'm so very confused
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Okysho said:
    Hey tenrdrmer, That's what I figured, but for some reason it didn't work. My bahaviours are as follows:

    (in main actor) if P is pressed and pause is false, change pause to true pause game <pause scene>

    (on a blank actor on pause screen) if P is pressed and pause is true, change pause to false and unpause

    This doesn't seem to work however... I'm so very confused

    ITshould be using the built in pause behavior and the built in unpause behavior. no attribute needed.

    If you want to do it the way your doing it, your gona have to make your pause attribute a interger. So 0 will be unpause and 1 will be paused. Have a rule when p is pressed change attribute game.pause to (game.pause+1)%2

    that will make it so when you press the the key it willl change from 0 to 1 and if oause is 1 it will change back to 0 all in the one expression and keep toggling between them
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    try getting rid of the Pause is true/false checks? I don't know why you'd need them.
  • OkyshoOkysho Member Posts: 158
    I just assumed they might be necessary. It works now, thanks lol.
  • quantumsheepquantumsheep Member Posts: 8,188
    Okysho said:
    I just assumed they might be necessary. It works now, thanks lol.

    I know your Avatar is from Final Fantasy.

    I KNOW this...

    And yet every time I see it, all I can picture is Chewy on Hoth, having just destroyed an imperial probe droid!

    Weird, eh? :O

    QS :D

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

Sign In or Register to comment.