how can i make a volume knob style thing
diegocs
Member Posts: 531
how can i make this in gamesalad (that works with touch) http://www.google.com/search?client=safari&rls=en&q=volume+knob&oe=UTF-8&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&ei=IGrOT6GJAejJ0QGB5vmCDA&biw=1920&bih=899&sei=IWrOT5qEL4Lf0QHu4f2LDA
Answers
make it respond to touch theres a lot of tutes on this, i'm not sure iff you can make it turn with circular movements, may have to swipe at one side to make it work.
then in game make a interger, called volume and set a rule that says actor rotation 0-10 degrees sets volume to 1, 11-20 set it to 2 (i didnt do the math to see how many divisions it would take to come out even but whatever)
then in your music playing rule you can have it look at the volume interger atribute
thats pretty loose but its how i would look into figuring it out
Then have a rule when touch is pressed:
-change attribute startRotation to self.rotation
-change attribute startAngle to vectorToAngle(mouse.position.x-self.position.x,mouse.position.y-self.position.y)
-constrain attribute newAngle to vectorToAngle(mouse.position.x-self.position.x,mouse.position.y-self.position.y)
-constrain attribute selfRotation to startRotation+(newAngle-startAngle)