Resume button not working properly
Mayhem_Madness
Member, PRO Posts: 168
Hi everyone, Thor speaking.
I have a resume button after i pause the game. But when i press resume my actor jumps up after. Which i don't want to happen.
This is because i have a rule that when the screen is pressed my actor jumps.
So how would i do it so when i press the resume button my actor doesn't jump.
Thankyou.
Thor.
Comments
@thor Create an attribute called paused.
Set your screen swipe to fire only when game.paused=0
If your game is paused, set game.paused=1
When you press the resume (unpause) button, make sure to set game.paused=0 just before the Unpause Game behavior.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
@Thor Make the resume button a touch is released, that way it will only unpause when your finger is already up and not activate the jump.
Fortuna Infortuna Forti Una
Thankyou Lovejoy and summation.
@tatiang
Hi tatiang, have you got any ideas on what i could do for this, because i can't seem to get it work.
Thanks.
@tatiang
Im really stuck on this, this is pretty much the last thing i need to do.
Thanks.
Anyone?
Did you try the suggestions above?
If you did and its still happening then the jump is activated right before the game pauses. So to fix it you need to make the pause button area not activate the jump. So whatever actor you have to activate touch, make it smaller so it doesn't go over the pause button.
Fortuna Infortuna Forti Una
I have a game.touch.count, so that wouldn't work, and yes i did try the suggestions.
Here's a demo. Note that the order of the actors on the layer does make a difference. Re-order them and it won't work.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi tatiang, i have just tried your demo, and it doesn't seem to be working.
Any ideas of why it might not be working?
Thanks.
Any ideas on a different way i can do it?
Thanks.
When i press the pause button it works, however when i press the resume button my actor still moves.
I have just tried it in a blank project and its working. But in my project its not, is there something wrong with my project?
Thanks.
Anyone?
It would seem that the only logical conclusion is that your project has a conflicting rule, if the demo works in a blank project.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
But then why is it that, when I take about the pause touch rules. So that when I pause it the actor doesn't move. It still works when the rules are out.
So when I pause the game, the actor doesn't move, but when I resume the game the actor moves.
We won't know without being able to look at your rules.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)