Reset Attribute?
Here's an example scenario, let's say I'm making a platformer, the user has to collect say 10 coins to complete the level and move on to the next. I setup a collected attribute and a remaining attribute, I display them on the screen for the end user.
Now, when we hit a game over/loss scene, we'd reset coins collected to 0 as it'll always be set back to 0, but for remaining coins, it's not a static number so how could I reset it back to it's initial state when the scene resets?
I know I can go into each level and manually set it up to reset the remaining coins to 10 for level 1, 20 for level 2, etc. but looking for a more automated way to go about it than such labor intensive actions when I start having 10, 20, 30 levels etc lol.
Now, when we hit a game over/loss scene, we'd reset coins collected to 0 as it'll always be set back to 0, but for remaining coins, it's not a static number so how could I reset it back to it's initial state when the scene resets?
I know I can go into each level and manually set it up to reset the remaining coins to 10 for level 1, 20 for level 2, etc. but looking for a more automated way to go about it than such labor intensive actions when I start having 10, 20, 30 levels etc lol.
Comments