Wheel of fortune:)

Get help using Construct 2

Post » Tue Feb 21, 2012 11:08 am

I mean wheel rotate and when stops on one of 8 fields > do something
How do i that thing?
B
110
S
27
G
47
Posts: 1,887
Reputation: 35,799

Post » Tue Feb 21, 2012 12:03 pm

360/8=45 so pick a random number 1-8 multiply it by 45.
If we get anglelerp you could just do:
sprite set angle to anglelerp(self.angle,random*45,something*dt)
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Tue Feb 21, 2012 4:17 pm

i try figure it out
B
110
S
27
G
47
Posts: 1,887
Reputation: 35,799

Post » Tue Feb 21, 2012 9:14 pm

Randomly generating an angle is okay if all you want is the answer, but if you want to show the wheel rotating, you could take an approach like this one. I randomly generate an angle (number of degrees, then rotate the wheel that number of degrees and check to see what wedge on the wheel the needle overlaps.

I'm sure it could be made much better with lerps and things. It isn't 100% accurate, but it may help you.

WheelOfMisfortune.capx

B
30
S
12
G
12
Posts: 281
Reputation: 12,178

Post » Tue Feb 21, 2012 9:56 pm

wow you helped me a lot Thanks! :)
B
110
S
27
G
47
Posts: 1,887
Reputation: 35,799

Post » Wed Feb 22, 2012 5:08 pm

I used Kittiewan's graphics and build a version that uses physics to add realism...

CAPXWeishaupt2012-02-22 17:10:03
B
44
S
23
G
13
Posts: 723
Reputation: 14,935

Post » Wed Feb 22, 2012 5:30 pm

its cool too :)
B
110
S
27
G
47
Posts: 1,887
Reputation: 35,799

Post » Fri Apr 21, 2017 6:21 pm

Message: kanishka3001 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hey all,

I'm trying to make a spinwheel game like Wheel of Fortune, where the wheel is with several gifts around the edges.When I shake the phone wheel start spinning and then after few seconds I want to slow the rotation. And at the end I would like to identify the gift, which points to the arrow. So far I'm good detecting phone shake. I tried to spin the wheel but so far no luck.

Capx:
https://windsorsolutions.co/games/wheel.capx

Can you please share the WheelOfMisfortune.capx if you can. @kittiewan and @Weishaupt

I am really not good with physics and have tried this is several ways. Maybe there is a better/easier way to do it without physics, but right now I'm coming up with blanks. Any ideas would be appreciated!
B
4
Posts: 5
Reputation: 210

Post » Fri Apr 21, 2017 6:40 pm

kanishka3001 wrote:Hey all,

I'm trying to make a spinwheel game like Wheel of Fortune, where the wheel is with several gifts around the edges.When I shake the phone wheel start spinning and then after few seconds I want to slow the rotation. And at the end I would like to identify the gift, which points to the arrow. So far I'm good detecting phone shake. I tried to spin the wheel but so far no luck.

Capx:
https://windsorsolutions.co/games/wheel.capx

Can you please share the WheelOfMisfortune.capx if you can. @kittiewan and @Weishaupt

I am really not good with physics and have tried this is several ways. Maybe there is a better/easier way to do it without physics, but right now I'm coming up with blanks. Any ideas would be appreciated!


Please check the user profile before tagging them. It's been over 3 years since the 2 users you have tagged have been on this forum.

Rather than bumping threads that are years old, why not create your own thread in the 'How Do I' section.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, MeteoorSC, TRMG and 24 guests