How to make an lucky wheel?

hello friends

i want to make an lucky wheel for my game , please anyone can guide me?

Hi! You could create the sprite of the wheel, and put the origin at the wheel’s center. Then just make the sprite turn modifing the angle some degrees every scene’s step, substracting a bit of that quantity until a random time. The result obtained may be defined for angle ranges, like for example, “from 0 to 45 degrees, the price is 100$”


You may want to describe what you want a bit better - not everyone will be familiar with what a lucky wheel is.

I’m going to assume it’s like a wheel that spins around with a set of prizes on it. In which case, you’ll want a sprite of the wheel. Add an instance variable to hold the spin time - make this 2 decimal places to ensure the spin time is reasonably random. Then start an object timer. Have an event that checks if the timer is < the spin time, and if so increase the sprite’s angle by a set amount.

Once the timer > spin time, get the resulting angle and have a set of events that hold angle ranges and the prize that belongs to that range.

Ha, beaten by @ars_creativa by a few seconds :smiley:


The lucky wheel of responses! :joy:


thank you guys a lot for paying attention

yes i want a lucky wheel for giving some prize to my users

is that possible please make an example project for me?
because i’m new here and just can edit projects , i will be very thankful if you help me

thank a lot

can you please? i will be very thankful

Not a complete project, but a section that will do what you are after. If there are actions or conditions you don’t understand, check in the wiki first, and then post on the forums if you’re still stuck.

Create your lucky wheel sprite. add a number object variable named “SpinDuration” and a boolean object variable named “IsSpinning”

Use the following code to spin the wheel:

1 Like

thank you so much for your kindness

i want to set a button for user to see one ads , then he receive one score to spin lucky wheel
so i want to know
i want to prize real money , so its should be a little hard for earn money , so is that possible to set chance of win for each prize?

Sure, just make the angle/segment smaller than the rest.

can you please make this project and send me files? i try but couldn’t make it

looks like i’m do it wrong

would you please make a project for me as i want and send me files? i can pay you

Sorry, I’m not doing a complete project. What I’ve given you is pretty much a complete set of events.

I suggest you follow the GDevelop 5 Tutorials, and post on this forum if you run into any problems.

1 Like

its not a complete project , i just want lucky wheel part
or you can just send me that file from screenshot

That looks good. Thanks for sharing