This guide will attempt to replicate a spinner in real life. It will include the slowdown and randomization. Let’s get into it!
Constructing the base
Make a spinner-like thing:
Next, make your arrows. Make sure that one is active on game start, and the rest are inactive on game start. I’m making mine out of text because it’s easier to rotate and add channels to, but you’re welcome to make them out of barriers. Just make sure they activate and deactivate on the right channels.
Now, let’s add the channels to the arrows. The channels will be in the format “SpinnerActivate[ARROW_NUMBER]”. You put in the arrow number for [ARROW_NUMBER]. You want the first arrow (the one active on game start) to be 0, the 2nd one to be 1, and so on. Here’s what it is for me:
Basically, you need to go in order. The direction doesn’t matter. Make all the arrows deactivate on “deactivateAllArrows”.
Randomizing The Spinner
So now, we are going to make a simplish randomizer. We’re going to use block segmentation to save memory with a later part of the guide. Get a trigger, and make it receive on “blockSegment”. Make a number property named “randomizerRunNum” with a default of 1. Make 2 more number properties: CurrentArrow and randomResultCountdown. Add these blocks to the trigger:
For [RESULT_NAME_HERE], add whatever name you want for the concatenation.
Making the Spinner’s Speed
We’ve done all the heavy work now! All we have to do is to make some triggers with delays, and it will work! I have 8 sections, so each row has 8 triggers. However, you need to have as 3x as many triggers as you have sections.
The first trigger should be triggered on “startSpinning”. All triggers should broadcast on “startRandomCalc”, activate on “activateSpinner”, and deactivate on “stopSpinner”. I recommend using the copy-paste function for this. For the delays, I used .1 for the top row, and then .2 for the rightmost 2 triggers on the 2nd row, and then each trigger increased by .05s.
All there is left to do is to start the spinner! You need one more trigger that receives on aa wire to start and broadcasts on “activateSpinner”. I used a button that broadcasts on “startRandomCalc” and triggers the trigger with a wire. Oh, and make sure that the
If you want to see the result, check out the showcase link in my bio. It may not seem random, but it really is random.