Turn a wheel with you finger
mmzbr
Member Posts: 311
Does anyone know what method should I use to create a wheel than turn when press your finger on it? I want a effect like wheel of fortune games in the top view and finger speed/release sensitive.
Any idea how to do it?
PS: Sorry my english.
Any idea how to do it?
PS: Sorry my english.
Comments
----
Set up an integer attribute called roarer and set it to 0
Or when touch is pressed change attribute "Rotater" to +1
When game.rotater = +1 Rotate to angle...
Hope this helps,
_____________________________________________________________________________
Free GameSalad Help Tutorials & Templates
Free follow my finger tutorial
Contact
∆ New Free Templates Coming Soon ∆ New Paid Templates Coming Soon ∆ New full game coming soon ∆ For publishing help contact me!
im crunched for time today but this is a very ruff project file that wil get you started.
http://gshelper.com/gs/spin.zip
Genius !
: )
Cheers, really useful for me too !
http://www.mediafire.com/?q659666wsrliox3
It was fun to figure out how to do this!
RThurman
Brilliant !
: )
Cheers, I will be stealing your excellent code rather shortly !
Glad it will work for you! Isn't GameSalad great!?!
RThurman
What I need is: when the wheel stops (after get rolled), is change the scene based on the area on wheel stopped. Like the video:
Its possible to use the wheel angle for this? Love= 1 to 90 (based on wheels angle), so like, after wheels stops, if actual angle is 90 (correspond to Love) change scene to love or its a better and easy method do that?
1. Create attribute Game.ActiveAngle and use ANGLE type (important)
2. In your spinning actor you will need to determine when it stops spinning (I used rule when Self.Motion.Angular Velocity = 0 then
3. Use change Attribute behaviour to set Game.ActiveAngle to self.Rotation
4. Then use rule if Game.ActiveAngle>0 AND Game.ActiveAngle<90 ... then your rules ... ie: Attribute QuestionsType=1 or Health etc
*Note the >0 and <90 will be determined based on how you designed you wheel image. If a separating line is pointing directly up it will be 0, 90, 180 and 270 but if it is not striaght up those numbers will change and you will need to play around a bit (I would suggest opening your image editor and making it straight up to make this easier)
http://www.mediafire.com/download.php?fdfyfcb3rdzq8cy