Discuss Scratch

DfntlynotNinja
Scratcher
25 posts

How to make a currency

I would like to make a currency between people called “Eggs” So you can use these to either skip a riddle or buy new cats or baskets … I would like this to save between people so they don't have to restart … basically a digital currency … Can anyone help me with the code? It would help if there were cloud lists to so i could see if people are lying about there current currency … Thanks!
when green flag clicked
say [Thanks!]

Last edited by DfntlynotNinja (June 8, 2020 19:15:19)

AidyGamer60
Scratcher
100+ posts

How to make a currency

I'm making a project to demonstrate the code. I'll edit this post and give the link once I'm done. Sorry if I can't do it.
AidyGamer60
Scratcher
100+ posts

How to make a currency

Ah, come on. I'm trying to make it and can't assign it to the user. Sorry, I tried ;-;
DfntlynotNinja
Scratcher
25 posts

How to make a currency

AidyGamer60 wrote:

Ah, come on. I'm trying to make it and can't assign it to the user. Sorry, I tried ;-;
its fine! at least you tried to help
AidyGamer60
Scratcher
100+ posts

How to make a currency

DfntlynotNinja wrote:

AidyGamer60 wrote:

Ah, come on. I'm trying to make it and can't assign it to the user. Sorry, I tried ;-;
its fine! at least you tried to help
Good luck!
Edgarli2020
Scratcher
36 posts

How to make a currency

I made currency for my clicker game, and this is how it works (not the exact code just what it is basically)

when this sprite clicked
change by (1)

so then basically the currency (which is a variable) goes up by one every time you click. And when I want to buy something?
when this sprite clicked
if <[currency] > [99]> then
change [ currency] by (-100)
broadcast [ v]


else
broadcast [ not enough]
end


The 1st line keeps the game from just going into negative currency and thus creating infinite currency.
then the game will take away 100 currency from you, and broadcast a message, which you can use to work out what happens when you buy the item, e.g when I receive x message, increase currency per second by 1 and the "else" command will broadcast a "not enough" message, which you can turn into a literal "not enough" message.
IK that this reply is messy and hard to read, but does that help?

Last edited by Edgarli2020 (June 9, 2020 01:15:30)

DfntlynotNinja
Scratcher
25 posts

How to make a currency

Thanks! This really helped a lot and you guys are going in the notes and credit section … like 30 times!!!!!

Powered by DjangoBB