Ok honestly I didn't think I would have this problem since I figured out how to save highscores. But alas its not the same!! I been going crazy for a day now , even followed the tutorial on local storage and it didn't work.
Player shoots enemies and money goes up. All I want to do is save the money so when you die and come back the money you earn last session is still there . Then when you play you can earn more money and save up.
Develop games in your browser. Powerful, performant & highly capable.
Here is my 2nd try its exactly like the tutorial and doesnt work.
After hours of experiments I found a solution but I don't really like it and hope there is a better method in the future. I added an event to my shooting method which updates the key and set it to the variable. To me this feels like sloppy code but it works for now. There must be a more streamline method.