How to make a count of all coins that does not reset

How to make a coin account that goes for all cards(they are separate) and is not reset after exiting and displays it all in the widget

Save Game?

  • count something → create a save game object → push the value in → save to disk
  • load game → get value → create the widget → push the value into the widget

Admittedly, this part is somewhat confusing:

1 Like

Okay I’ll try\

1 Like

Probably couldn’t translate it well, I apologize

1 Like

Is it possible to calculate from the player variable, I can attach a screenshot of how it works?
Or still Game Istance

What do I need to connect to object in save game?

Follow the link I sent. There is an entire step-by-step. You can also find plenty of tutorials on YT!

1 Like

Sorry I didn’t see the link

Hi @Everyone but for some reason in widgete instead of the number with the coin count, it gives an empty space

Without seeing the script, it’s impossible to tell what is up - there can be approximately 999 issues causing it. Show and explain how you’re counting and updating the widget.

1 Like


This is located in the player

And this is in the widget

I hope it helps

Tick executes every frame, and so do bound functions. You’re saving and loading the game 60 or more times per second. Instead, do it only once. When you quit the game and when the game begins - this the place to create and update the widget.

Consider looking up any YT tutorial that deals with save games. Or look at the documentation in the link.

1 Like