Unpausing Behavior Issue
Simple Gamer Arts
Member, PRO Posts: 305
So I have my Game-Scene and to pause it I use the "Pause-Behavior" that takes the game to the Pause Scene; so when I touch the "Unpause-Behavior," the actual touch that unpauses the game influences the Game-Scene as well. So, in other words, my actor jumps every time I unpause my game.
Any solutions to this? Or should I limit the "Game-Scene's" area of touch activity?
Comments
Hey Vox,
I think you have the right idea. I had a similar functionality in a stealth game where you touch the screen to shoot but there was also a pause button, so if the pause button were touched the character would also shoot.
When you said you should 'limit' the Game-Scene's area of touch activity, that's not a bad idea at all.
How I did this in my game is by going into my character and instead of saying "when i tap, you jump" (in GS language of course), I changed it to say "when i tap, and my mouse position (which is also finger position) is NOT in the area where the pause button is, THEN you jump.) It worked fine for me, and you seem to already understand the concept since you brought it up. Hopefully it works out.
@Cutscene Entertainment Thanks Cutscene, I've been trying that out but somehow haven't pulled it off just yet... geez, so frustrating. So tedious this coding thing.
Well, I'll keep this thread posted on how I pull it off eventually.
I would suggest to change it (actor) when "Touch Released". Therefore it has to be pressed, but it will not actually un-pause the game until the player has released the touch. Which would mean there will be no touch input when the game resumes.
Best,
GSLearn.com | Templates | Free Demos | Udemy Course
@Two.E Hi TwoE and thank you.
That makes a lot of sense actually, tried it out but didn't work. I ended up just skipping the pause button during game play since it's a fast pace game; pausing during game play will only provoke player's death... at least i think.
Okay here is something:
game attributes you need to add: (located after clicking on the ''house'' picture above the bottom left,) B and C. (Integers). Then change their value to 1.
On your main actor, in the rule that makes him jump, add an attribute to your rule:
[attribute - if game attribute C is 1] - this is what you add
if touch is pressed (or whatever you have)
do:
jump (whatever you used here lol)
Once you find the actor section, select this guy:
pause actor (pause button).
rule:
attribute - if game attribute B is equal to 1
attribute - if game attribute C is equal to 1
if touch is pressed
do:
change attribute B to 0
change attribute C to 0
change scene to the pause scene
un-pause actor (un-pause button).
rule 2:
attribute - if game attribute B is equal to 0
attribute - if game attribute C is equal to 0
if touched is pressed
do:
(use this if the other stuff doesn't work: timer, (now put the rest of the rules inside the timer)
change attribute B to 1
change attribute C to 1
change scene to the normal scene.
Very complicated and might not work. But give it a shot, as it might help lol.
@Twayne2 Life is hard enough as it is hahahah!!! I'm kidding. Ok, I will advance on the game in the coming days and if I find that the pause button is 100% the missing element I will definitely give this a try.
I very much appreciate the time you took to write/decipher this, DAMN! lol!! AWESOME. You've earned a GameSalad badge on my end!
Lol good luck!