Reset Level vs. Reset Game

JoeMeisterJoeMeister Member Posts: 602
edited November -1 in Working with GS (Mac)
Happy New Year to all of you.

Working on my new game right now and experiencing this problem.
If I choose to reset level after testing my game, no matter what level I go back to, everything
goes wrong. Characters fly of the screen, actors you are only have to touch once now have to be touched twice in order to function and so on.
But if I select reset Game everything works fine.
I am worried about this since I probably want the user to allow to select or replay a level later on.

Any suggestions.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    Sounds like you need to reset attributes when you complete the level so when you go back the actors are in there original state.

    Darren.
  • JoeMeisterJoeMeister Member Posts: 602
    Makes sense. But how do I do that?
  • JoeMeisterJoeMeister Member Posts: 602
    JoeMeister said:
    Makes sense. But how do I do that?

    I mean I have lots of actors moving around on stage. How do I reset all these attributes?
  • UtopianGamesUtopianGames Member Posts: 5,692
    In every actor that moves try adding 2 local attributes (real) StartX and StartY then at the top of your code do change attribute StartX to Self.Position.X etc this will save the initial starting position.

    Then when the scene is reset you need to do change attribute self.Position.X to StartX

    Darren.
  • JoeMeisterJoeMeister Member Posts: 602
    Thank you and HAPPY NEW YEAR.
Sign In or Register to comment.