How do you make the random result of a slot machine spin

I’m trying to make a slot machine, and I have 8 different images on each “wheel,” and I got it to the point of the wheel spinning via a wire repeater clock, but I need to know how to make it stop randomly… Any ideas?

i have tried to do this b4 i still have not figured out how to do the animation for the weapon randomizer so it might not be possible but thats just me it could be possible now but who knows

Make a base animation of the wheel spinning first. Next, make a randomizer that chooses the outcome. After that, make it slow down to show that outcome.

I just made it with emojis in text devices, and then just cycle through showing one and hiding the previous one. They are all stacked on top of each other, though.

Ok, well how do I make the randomizer? Would I use triggers, and each trigger has a random chance of being picked from the block code?

Yeah. This is a pretty complicated system that I’ll think about for a bit.

Ok. I thought about it and you need a trigger that activates the current display on the slot machine, and a recursing trigger chain that triggers each trigger for the current display. @Blackfox45666 made one like that. This is the base setup. I’ll get to the randomizer later.

@Shdwy qmech help: how do I get a delayed recursion to stop at 301 or some number? This isn’t really that necessary because I have another system that’s possible, but the recursion limit will help stop lag.

Hm, would a dice help?The Coralian Version on Dice (That Are Visually. Pleasing!) 3/10 or :green_square:

would this guide help?

How would I change this to fit the animation of the wheel spinning, and maybe slowing down?

I’d recommend making a base animation of the wheel spinning, and then creating individual animations for it slowing down to each outcome.

i don’t know, im not good at coding, I just thought you might need the code for randomizing things

@GabrielisAwake I have developed a system that will work for you when I get some time I’ll make a Community Made Guides and link here.

Use this guide:

1 Like

Thank you for making this! I’ll try messing around with it to see if I can fit the animation for the spinning on there as well, but until then I’ll be using your idea for it!

1 Like

Oh, I didn’t make this, this was a guide made by @cheesebox. I only sent you the link to it…

Here is my the my guide.

No problem! I’m glad you found my guide useful.

I think you can fit your animation in there, just use checker devices – 1 for each animation – and have the first one be activated in between the button being pressed and the popup opening.

Have the first one check if a property value is equal to the animation it corresponds to.

If the check fails, it’ll pass it onto the next one, and the next, and so on until one passes, and that animation is played by receiving a channel transmission, and once the animation finishes, the signal is sent for the popup to open.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.