Currency Counter

Im trying to figure out how to do currency for my game
I need to make it where you can see how much coins you have ingame and so it can track and subtract the coins you have once you buy something and add to the number once you collect coins or sell something

For that you would use global number variable for example call it COINS
And you simply add or subtract to/from that variable when you pick up coin or when you sell/buy

But when you do action for buying for example you want to buy a shield worth 100 coins
You add condition to that event that Global variable COINS is higher than 100
This way you ensure you have enough coins to buy and your coins count do not go into negative
And you simply make action to subtract 100 from COINS variable
And add shield to your player inventory or whatever

Same thing you do when you sell stuff but to item
For example you want to sell that shield
So you check if your shield object count is above 1 in condition
And so if it is you add to COINS variable 100 and subtract one shield for inventory or player or whatever

Ok thank you very much!

Is this it?

@ZeroX4 But how would I make it so where it affects the text object

Nevermind I got it working

IDK what you got working so
1 - you have it as string and you need to change it to number variable
2 - you add text object to your scene place it on your scene
And now in events sheet you add action click on that text object and choose modify
And in there you put

I did number 1 and 2but for step 3 can you be a bit more specific and descriptive of it because I am having trouble finding where I choose modify

nvm I managed to get it working I had to reread what you first posted and I tried negative numbers for it to put and it worked

Sometimes it says change text sometimes text sometimes modify

I guess it changes on which text object you use
Normal text object or bitmap text object

BUT icon will always be the same
I use bitmap text object and in center section it says just Text as you see