automatic Reset scene not working how come? any idea

ok so in my game i have lives and points when you lose all your lives you go to gameover scene

i put a Boolean attribute in the game called reset scene

so for my automatic reset scene this is what i put
one actor on the actual gaming scene is

timer after 0.1 seconds
rule when attribute game.reset scene is false
change attribute game.reset scene to true
and reset scene

so on my game over scene i have a second reset scene actor

timer after 0.1
rule when attribute game.reset scene is true
change atribute game.reset scene to false

so that if i put a retry button it will be false( game.reset scene) so it would reset the actual gaming scene right when it starts

but what happens is that when i click retry on the game over scene it goes to the gaming scene and all the hearts are gone and the score still the same one from your last play

so anyone has any clue how to fix this or how to make an automatic scene restarter?
how is the logic that i set up does not work?

thanks GS community...

Comments

  • quique13quique13 Member Posts: 99
    someone knows?
  • quique13quique13 Member Posts: 99
    someone? someone knows how to instantly restart a scene
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Resetting scenes does not reset attributes. Make sure before the reset scene behaviour you have change attributes to manually change the attributes to what they should start on ... that way, when you restart the scene, all your lives, scores etc are put back to what they start on as opposed to what they finish on ... quite often forgetting to do this means your restart and gameover can get itself in a loop
  • quique13quique13 Member Posts: 99
    Thanks @beefy_clyro
  • joelloydjoelloyd Member, PRO Posts: 119

    can anyone tell me what beefy means by setting them to manually change them before scene reset?

    thanks

  • joelloydjoelloyd Member, PRO Posts: 119
    edited February 2015

    just realised i bumped an old thread, sorry about that.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2015

    @joelloyd He just means that game attributes are not reset by a Reset Scene behavior or a Change Scene behavior. So if you want to reset something like game.score then you would do this:

    Change Attribute game.score to 0
    Reset Scene

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • joelloydjoelloyd Member, PRO Posts: 119

    Ahh thankyou tatiang

Sign In or Register to comment.