Thoughts on a Pause/Play button?
auriclux
Member Posts: 16
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.
***
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
I'll leave the comment up in case it helps anyone else.
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?
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.
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.