Reset Scene from a Pause Scene (iPad Bug)

Lordal_ZeroLordal_Zero Member, PRO Posts: 17
edited November -1 in Working with GS (Mac)
Hi everyone,

I created a pause scene with a reset button, a game scene and a game attribute to switch between reset on or off that goes like this:

/Pause Scene - Reset Actor
When touch is pressed:
unpause game
game.reset to true

/Game Scene - Reseter Actor
when game.reset is true
reset scene

So when you test it on the mac previewer it causes a glitch, it seems like the attribute constantly resets the scene so I added the following line to my Reseter Actor in the Game Scene after the reset scene action:

game.reset to false

When I hit preview in the mac, it works perfectly, it DOES reset the game scene and unpause the game, works great, but when I hit Preview on my iPad and I hit the reset button it shows the loading animation and the game hangs in there, doing nothing.

I want to know if this is only an iPad issue or I'm doing something wrong.
The other choice I have is to make a pause scene for EVERY level in my game and that reset button will only change to my level scene but I don't know if my memory will overload and slows by duplicating the number of scenes per level by adding a pause scene to each one.

Many thanks in advance,

Lordal Zero

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Put the reset scene behavior on a timer. I'm doing the exact same thing on my iPad and it works

    When paused I have a reset button. When you hit that, it sets resetgame to true and after ,1 seconds it unpauses the game. Then I have a rule that says if resetgame is true after .1 sec reset the scene
  • Lordal_ZeroLordal_Zero Member, PRO Posts: 17
    jonmulcahy said:
    Put the reset scene behavior on a timer. I'm doing the exact same thing on my iPad and it works

    When paused I have a reset button. When you hit that, it sets resetgame to true and after ,1 seconds it unpauses the game. Then I have a rule that says if resetgame is true after .1 sec reset the scene

    I just did that, it causes the game to constantly reset after 0.1 seconds when you press the reset button, what I did is that after the .1 sec and then reset scene I added change attribute to false so now it works perfectly.

    I tried to make something like you said, adding a 0.000001 timer to the Reset Button on the pause scene but I didn't added the .1 timer to reset the scene after.

    Really many thanks, you made my day :)
Sign In or Register to comment.