Pause button
tekkendp
Member Posts: 49
Hi guys,
Managed to create a pause button for my game. And it works - sort of. When I click to pause or unpause, it seems like it doesn't always read the mouse click on the pause actor. Sometimes it works, sometimes not.
I created an actor called pause. I also created a global attribute called game paused (assigned boolean false as default). I then added a change attribute (nested in a rule) to all movable actors as false. So if false actors move, if true they do nothing.
The pause actor looks like this:-
<img src=http://www.freeimagehosting.net/uploads/th.30e5ff2c7e.png alt="Free Image Hosting by FreeImageHosting.net">
Any ideas why i'm getting intermittant response?
Managed to create a pause button for my game. And it works - sort of. When I click to pause or unpause, it seems like it doesn't always read the mouse click on the pause actor. Sometimes it works, sometimes not.
I created an actor called pause. I also created a global attribute called game paused (assigned boolean false as default). I then added a change attribute (nested in a rule) to all movable actors as false. So if false actors move, if true they do nothing.
The pause actor looks like this:-
<img src=http://www.freeimagehosting.net/uploads/th.30e5ff2c7e.png alt="Free Image Hosting by FreeImageHosting.net">
Any ideas why i'm getting intermittant response?
Comments
thanks for the tip - tried that. Still getting the same results. Currently checking the logic in the game to see what's screwing up the pause action. Any more tips would be warmly accepted.
You could just have the rule:
IF Pause button is pressed...
Got to Scene 'PAUSE' - while making sure that you tick the 'preserve current scene' button.
Then on the pause screen, have a 'Go back' actor that says:
If 'Go back' is pressed
Then go back to scene 1.
If you have multiple scenes, make a real number variable for each scene. e.g. when you start game scene 1, change attribute 'Level' to 1.
If you do this for each level, then you can state on your pause screen:
If level = 1 then go to level 1.
If leve = 2 then go to level 2.
etc.
Hope that's clear and helps!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
So now in the pause scene, I can put all the "if's" in a group? Is that recommended?
I searched the forums and saw there may have been an issue with preserve scene function with 0.8.1 but that it was fixed in 0.8.2. I just created this brand new in 0.8.2 and it still seems to be broken. Is this a bug?
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Not a problem.
er...
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Do you know of any other way to pause a game (while we wait for the Gamesalald guys to fix this bug)? I went back to my old method, and that is still a no go.
I have been emailing Jonathan (who has been very helpful), and recommended save/load attributes behaviours, but I'm not sure I want to do it that way, as it will increase the amount of attributes required - which I understand from reading up on here, can seriously slow things down. I have already had to add extra stuff to get my sound working with destroy bug.
So, any tips? Cheers.