Is there a way to double someones cash or remove it all depending on a random number?

I want to make a ahem slot machine sort of thing.

Yes! Use blocks and an item granter. In the blocks, check if a random number between 1 and 10 is equal to 1, if so, have the item granter grant cash. Otherwise, have another item granter remove cash. Hope this helps!

thank you so much! I appreciate it

wait, how do i get the amount of cash that they have and use that in the block coding?

You could use an item manager that stores the amount of cash in a property

hmmm…i’ll try it later

how do you double their cash though

a property wouldn’t work as you’d need one for each player.

You could set the scope of the property to player

store cash in a property and then use blocks to set the property to 2 times itself? you don’t need to make a new property for each player because properties can be set to only update individually

1 Like

:open_mouth: :open_mouth: :open_mouth: :open_mouth: :open_mouth: :open_mouth: I FORGOT ABOUT THAT OMG OMG UR A GENIUS

omg this solves me so many problems as well

but how do i convert the property to cash that can be given to the player?

you could put this in an item granter set to give a player cash when activated:
if the cash property keeps track of how much money the player has, then granting the player that much money will double the amount that they have. (the block also updates the cash property after granting the item so that it stays accurate)

thank you so much for the help

Any idea why this isnt working?

Screenshot 2023-06-01 9.16.13 AM

I got it.
0 x 2 = 0
first and last block.

1 Like

Simple math lol

1 Like

I think this is clay-institute


There’s a topic for that?!

This isn’t really anything special though.