GAMEOVER/RETRY LEVEL Function (Please Help Me Improve It)

JoshKahaneJoshKahane Member Posts: 470
edited November -1 in Working with GS (Mac)
Hi

So, for my game, to add a retry level function and detect which level it has to change to when pressing the retry level button on my game over scene I make an attribute for example called Level4Retry.

Whenever my actor collides with another actor in level 4 which is meant to cause a game over it make the above attribute true. Then on my Retry Level actor (button) it has a rule for each level saying if this is true, change scene. In this example, it would change to level 4.

Only I have an issue that sometime these stay true after playing several levels in a row, for example I play level 8, and fail it once or twice but eventually complete it. Then I decide to go back to level 4 (or any level) to play it, but I fail at it and so I am given the opportunity on my Game Over scene to retry level. But of course because some of the attributes from earlier are still true, it takes me to the wrong level; the one I had played before.

I figured that if every time one of these attributes become true, the rest must revert to false, but I have 40 levels, so how can I do this without having to add a ridiculous amount of Change Attribute (one for every other level) to change all the others to false?

Hope that makes sense. A lot of information, but kind of makes sense I think. :)

Comments

  • JoshKahaneJoshKahane Member Posts: 470
    If it makes it simpler, I basically want an easier and quicker and more efficient way of setting about 39 attributes to false at once, otherwise it will take me forever, and I don't know what the effect on performance will be.
  • JoshKahaneJoshKahane Member Posts: 470
    Hnag on, are these two different methods? Or should I use both?

    Also, if they are individual I imagine just adding a scene reset would be easier yes?
Sign In or Register to comment.