Discuss Scratch

Mylaws
Scratcher
24 posts

Coin Flip isn't working as intended.

(THIS ISNT ADVERTISING)
Hey, so I've spent a few hours on this new project of mine, and it's going great so far. But I am having an issue with one of my in game components, which is coin flip. This is basically where you flip a coin and you have a chance of either winning or losing however much you wanted to flip. So lets say you flipped 50 coins, you either gain 50 or lose 50. But for some reason this only works when you're low on coins. If you have a lot, it gives you thousands of coins out of no where. I sorta need help with that. I am too lazy to put the script in here, so if you go to here and click on any of “CF 100”, “CF 1000”, or “CF 10000” you can see the script of the coin flip. Also, just scroll your coins to like 5000 if you want to quickly test it instead of clicking. If you try to flip any of the coin flips you will gain thousands for no reason. Help would be greatly appreciated with an explanation so I can know what I did wrong and learn from that. Thank you so much!

Last edited by Mylaws (June 20, 2021 20:17:23)

Thingied
Scratcher
1000+ posts

Coin Flip isn't working as intended.

Try removing the broadcast and just change the Clicks variable locally.

(in all the CF sprites)
Mylaws
Scratcher
24 posts

Coin Flip isn't working as intended.

Thingied wrote:

Try removing the broadcast and just change the Clicks variable locally.

(in all the CF sprites)
Ayy it worked, thanks a lot!

Powered by DjangoBB