I don't know why "Reset Scene" is not working Properly !!! HELP !!!

David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
edited January 2012 in Working with GS (Mac)
Ok so i believe I'm doing this the right way but i want when my hero's life gets to zero, the scene to reset. Am i doing something wrong ?!? If you look at the pic of the code that i uploaded, it works fine when my hero jumps on the "spikes" actor and i "destroy" hero and reset scene, but when hero's left reaches zero, it'll "destroy" hero and reset scene but then the hero can't move. He's stuck in his "reset location" ANY SUGGESTIONS !!

image

The second rule reads :

when game.healthbarHero = 0
Destroy this actor
Reset Scene

Thats the one that isn't working :((

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    Try smaller or equal to 0
  • David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
    Tried that, both ways and it didn't work. any one else ?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Try to make a new attribute (boolean) saying this:

    when game.healthbarHero = 0
    change attribute to true

    In your reset rule say:

    when attribute is true
    reset scene

    I think that will work ;)

    Alex
  • David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
    I swore that was gonna work ... but no :(( I'm not sure what I'm doing wrong, the code looks like it should just work !! ARRGGGG !! lol
  • MotherHooseMotherHoose Member Posts: 2,456
    edited January 2012
    Destroy behavior … the computer stop processing that actor's behaviors
    Reset Scene behavior … the computer stop processing behaviors at that point (ignores everthing after it)

    since what you want to do is a Reset Scene … delete the Destroy behavior

    @};- MH
  • David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
    @MotherHoose - but it works that way with the spikes, is there a reason why it wouldn't work that way with the HERO ? jus wondering :)
  • MotherHooseMotherHoose Member Posts: 2,456
    @David_GryphonsRealm … of course in human logic … what you had should work
    but, not in computer logic! … which is linear and unreasonable …

    @};- MH
  • David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
    haha, well i tried what u suggested, still no go, I'm so confused !! hahha
  • MotherHooseMotherHoose Member Posts: 2,456
    David … do you have a collideRule on the spikes … with a Reset Scene?

    if so, leave it; then you only need Actor's healthRule … with just a Reset Scene

    if not, I haven't a clue as to why your Actor's collideRule is processing after the Destroy 8-|

    @};- MH
  • David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
    no it still doesn't work, i think I'm gonna have to go to the old DESTROY EVERYTHNG / SPAWN GAME OVER ACTOR / TOUCH TO START AGAIN /

    Which i wanted to avoid, lol
  • calvin9403calvin9403 Member Posts: 3,186
    Is your hero on the scene? Try revert to prototype
  • calvin9403calvin9403 Member Posts: 3,186
    An if that did not work, I have an insane idea.
    When lives=0

    Spawn actor spike and make the alpha to 0
  • DsAngelDsAngel Member Posts: 29
    Do u have any rule that prevent u from moving when the hero life hit 0?

    Or do u have anything that will prevent any movement when hero life hit 0?

    Can u describe ur situation more? like what happen when hero life reach 0, what should have happen exactly? do hero life auto refill back to default value?
  • David_GryphonsRealmDavid_GryphonsRealm Member Posts: 459
    @DSAngel : i think u got a right idea there, should i have an attribute to put HERO life back to original ? i figured reseting the scene would do that. but i may be wrong.
  • DsAngelDsAngel Member Posts: 29
    I think u should coz Reset Scene only reset the position of the actor... If ur value is store is the main attribute, the Reset Scene wont work!

    If you want to skip pass those thing u have said, then yup! u need to add a changeAttribute for game.Health To: 3(Or whatever u want)
    Remember, is you score is store in the main attribute, it might need to set to 0 before u can continue the new game! :)
  • Still havnt resolved this, for some reason after i reset my scene when HERO dies, he isn't able to move !! ARRRGGGG !!! :D any other ideas ??
  • POMPOM Member Posts: 2,599
    "still havnt resolved this, for some reason after i reset my scene when HERO dies, he isn't able to move !! ARRRGGGG !!! any other ideas ??"
    Maybe once you resort the scene , some attributes that needs to be reset is not resetting , try to add some change attribute when you reset the scene to reset the game or self attributes that are related to the movement of the actor..

    Roy.
  • they are simple left and right behaviors, but I'm gonna try it and let you know. thx :D
  • I FINALLY GOT IT !!! WHOOOOO !! my HERO's life attribute had to be "reset" for the HERO to be able to move again !! Thx for all your help everyone !!
Sign In or Register to comment.