Discuss Scratch

Wendeer
Scratcher
3 posts

Money system

So I wanted to add a currency system to my game, but cant figure out how to make it local.
To elaborate:
I want to make it so every time you catch an apple, you get 1 coin. And I want to make it so after you return (press green flag again), the coins you had stay. But I ran into an issue: it was not local, it was global. i.e. I have 35 apples, but another person plays the game. For some reason, they also have 35 apples, we always have the same amount of apples.

How do I fix this?
Thanks!
INSERT-USER_NAME
Scratcher
1000+ posts

Money system

I would suggest going to TurboWarp, clicking Addons, and searching for switch variables, that addon makes it so when you right click a variable, you can switch it between local or global.
Wendeer
Scratcher
3 posts

Money system

Alright! Thanks!
Wendeer
Scratcher
3 posts

Money system

Question, how do I apply those settings? Is it automatic?
-EmeraldThunder-
Scratcher
1000+ posts

Money system

Wendeer wrote:

(#4)
Question, how do I apply those settings? Is it automatic?
You need to save the file you are working on, upload it to Turbowarp, make the change using the above info and upload the file to scratch again. There is a way to do this in the editor, but we're not allowed to mention it.

Powered by DjangoBB