Thoughts on a Pause/Play button?

auricluxauriclux Member Posts: 16
edited August 2012 in Working with GS (PC)
I'm trying to put in a Pause/Play button like this:
***
Rule [Actor (Pause)]
When [All] ( Mouse [down], Mouse Position [Over Actor] )
Do:
Spawn Actor [Play]
Pause Game
***

BUT - the game freezes, I think because the game pauses BEFORE spawning [Play] and so is stuck.
I deleted the "Pause Game" and [Play] is spawned just the way I expect
I reinsert "Pause Game" and the game freezes.
I tried wrapping "Pause Game" in a timer to no avail.

Is there another implementation? (I didn't see it in my search of cookbook)


Also, is there a way to include images so that I may just include an image of my rule block?

Thanks.

Comments

  • auricluxauriclux Member Posts: 16
    Ack!!! - The timer wrapper works if I check the "Run to Completion" box.

    I'll leave the comment up in case it helps anyone else.
  • RPRP Member Posts: 1,990
    edited August 2012
    Hee hee the little Run To Completion Fairy said "f-U" ala Cartman style until you discovered its dastardly deeds. + points for self discovery.
  • auricluxauriclux Member Posts: 16
    edited August 2012
    Arrgh!!

    And NOW, when I started fooling with "Play" button - well things went bonkers again - I deleted the rules back to where I just spawn an actor - meaning that I have deleted the "Pause Game" function, BUT the game still pauses in the emulator as if the pause were still there (and I made sure proto and instance were bereft of "Pause Game")


    Also, is there a pic somewhere of that "Run to Completion" fairy?
  • auricluxauriclux Member Posts: 16
    Okay, when the game is paused, are the mouse controls disabled? I put separate pause and play buttons in the game set for a mouse button press - but when the game is paused, none of my mouse button press buttons work.
  • shark1505shark1505 Member Posts: 75
    You need two scenes for the pause button to work. One we'll call menu and one we'll call PLAY. So you would do in the menu scene (The one you currently have) :
    When mouse is down and mouse is over the actor
    - Pause game

    Then in your PLAY scene, you have a PLAY button that the user can click to change scenes and start the game.
  • auricluxauriclux Member Posts: 16
    edited August 2012
    Thanks Shark. I tried that, but what happens is that my game does not pause, nor does it change scene. Not what I expected to happen.

    I am able to use Change Scene successfully, but the "Pause Game" and "Unpause Game" Actions do not work in the same spot of a rule.
Sign In or Register to comment.