Gaining money and saving

Im very new to GD and I was wondering if its possible to have money save and add to the current state what i mean is that is you have ten dollars and you play and get 5 more you would have 15 and it would save every time you exit the game and go back and you could use it in a shop.

In case you mean real currency and in-app purchase, it is not possible out of the box.
Otherwise you can use storage events or file system events to store the value.permanently.
Examples are included in GD and you can also read about them on the wiki.

Filesystem:
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/filesystem

Storage:
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/storage

im trying to make an online currency the currency for me is the score of how far you run everytime you die the score restarts i want it to stay the same and add onto the score and if you purchase an in game item the score decreases how can i do that

In-game you want to use variables.
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables

To store the value/score/money permanently, you want to use the storage or filesystem events as I mentioned.

If you want to store the value online on a server somewhere, it is require you to use some sort of online database and code in JS, PHP or C# for example to handle the queries sent to the server.

If you are talking about real money to be spent in a real online store, you can use Shopify:
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/shopify
But you can not store real money in-game or spend real money for in-game item…etc

…or python. (Python is often a good choice if you are not very good at programming) (use flask for example)

1 Like