how to properly reset a scene?

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
i am wondering how can i properly reset a scene, like i added in when actor dies reset scene, or something like that, but when the scene resets the actors lives is 0 instead of 3, his coin amount is the same before the scene was reset, and the controlls dont work after the scene got reset, how can i fix this?

Comments

  • Barking_AppsBarking_Apps Member Posts: 182
    you need to create a Boolean attribute and have when you want to reset change attribute from game.reset to true. When game.reset is true change attributes (score to 3 etc.) and then of cause reset scene... watch the video below;

  • ironDanironDan Member Posts: 148
    Reset a scene will not reset any global attributes. Make an actor in your game that you can hide off screen and call him Control Center and have a rule that says when you Reset a Scene that it changes all the Global attributes back to their starting values.

    Example:
    When button or whatever action is active that resets the scene>

    Change Attribute: Lives to 3
    Change Attribute: Coins to 0

    Personally I wouldn't use the in game reset function. I like to make my own Global Attribute called Reset and and in my button or rule that is going to signal the reset I just say:

    when Reset if true

    Change Attribute: Lives to 3
    Change Attribute: Coins to 0
    Change Reset to False

    Also in the actors self attribute make a real attribute called self.x and self.y and then a change attribute for both that change self.x and self.y to self position x and self position y so that when you reset rule is fired off the actors will all return back to their starting positions.

    This is also how I do Pause and unease without using the built in rules.


    Good luck
    Dan






Sign In or Register to comment.