resetting all actors after pressing REPLAY on the PAUSE SCENE

app-etiteapp-etite Member Posts: 139
edited November -1 in Working with GS (Mac)
HI,

when my main character dies, about 4 actors are destroyed with it at the same time. so then if I press pause, which takes me to the pause scene and press replay to take me back to the game scene to start again all the destroyed actors are still destroyed. how do I reset it all back again.??

Thanks

www.twitter.com/appetitegames

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I have an attribute called resetScene when I would hit the replay button, I would make resetScene set to true, and unpause the game. Once your back in The game. After the game resumes, have a rule on all those actors that says, if reserascene is true, reset actors. Then after, set it back to false
  • app-etiteapp-etite Member Posts: 139
    thanks jon

    But im doing good until I get to...

    If resetscene is true then reset actors. there is no reset actors behaviour?

    what was you referring to there?

    Thanks
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    use reset scene to reset the actors...

    So have a rule like:

    if attribute game.resetMyScene = 1

    Reset Scene

    After 0.1 seconds change game.resetMyScene to 0

    ...

    :-)
  • app-etiteapp-etite Member Posts: 139
    thanks!

    Ive got my actors all resetting now.. but my life hearts in the corner are not.

    I have 3 hearts using the replicate behaviour.. how can I get them back to three once the level is over??
  • app-etiteapp-etite Member Posts: 139
    sorry i got it.

    just put a change attribute game.lives to 3 for the first behaviour

    :)
Sign In or Register to comment.