Hi guys, We are from Germany and we are doing a project in our Informatic class, I need a little help on one part of our project :,)
We want to create a game where every player (3 players) chose a color (3 colors) of the roulette and the roulette spins, so at the end one of the color is given. So the roulette has basically 6 layers (2 layers for every color).
Which commands do I need for that? (And We also did not find out how we make the roulette spin)
We already have a designed roulette!
Checking if selection matches choices and notifying player(s)
It’s a lot to ask how to do all of this. Which parts have you completed and which ones do you need help with? Have you searched the forums, Google and YouTube for these topics? There are many examples of how to randomize choices.
It’s best to provide what you have made so far (screenshots or project link) and ask specific questions.
Thank you for your answer!!
We already have the wheel designed and the buttons. We do not know how to let it spin and stop after a random amount of time.
the question is how can we let a picture spin and give out random results.
we would be really thankfull for an anwser
greetings
informatics 101 from Berlin city
If you have an overhead view of the roulette wheel and the sprite’s image is circular, then you can rotate the sprite a small amount (such as 1 degree) by setting the sprite’s direction to the sprite’s direction + 1. See these blocks:
And repeat that a random number of times. You’ll want to set a minimum and maximum number of times and you may have to adjust the angular velocity. For example, you wouldn’t want to turn the sprite 4 degrees (random set to 4, turn 1 degree) because it wouldn’t really be noticeable and it wouldn’t be a good visual effect. So maybe start with number >=360.
If you have an arrow or line or other indicator pointing to one part of the circle, then when the sprite stops turning, you determine which number on the roulette wheel was chosen based on what lines up with that arrow. And you calculate it by the starting point of the wheel/sprite and how many turns it made.