![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | dingadev |
Hi everyone !
I’m working on a game in which you can collect three collectibles in each level, it’s a system similar to the Star Coins you can find in New Super Mario Games.
I made a script for the Star Coins which emits a signal to a LevelScript
every time a Star coin is collected and updates the GUI depending on which one is collected.
At the beginning of each level I set the value of each Star Coin is_collected
to false
and it works fine.
My problem is : I would like my game to store the collected Star Coins for each level, so that the player can later restart the level and get the ones they missed. And currently it is not the case, as the amount of collected Star Coins are passed on to every level.
I am not sure how I should proceed : I’ve read online that making a list, store each Star Coin ID then check which one is collected might be the solution. I’m currently trying to implement this but I feel there is another, more dynamic way to solve this issue. That’s why I’m posting this question.
I haven’t provided the code because I don’t find it relevant for this issue, but I’ll gladly share it if required.
Thanks in advance for your help!