I've been reading a lot of the manual entries wondering how to achieve mi sprite (a lamp) turns along with the movement of "some" slider... but i still can't do it.
Here's an image and the file:
<img src="http://img338.imageshack.us/img338/4372/09c505335.jpg" border="0" />
Im just triying to get it moving into the red range, or maybe get the movement with a text entry if this wont't work.
<img src="http://img577.imageshack.us/img577/9880/9276967d7.jpg" border="0" />
Your images are broken, but if you just want to set the angle of an object dependent on the position of a slider, just use this formula:
angle = ((slider current X - slider initial X) * constant)
Where 'constant' will change depending on how much you want it to turn for some movement of the slider.
Develop games in your browser. Powerful, performant & highly capable.
Thank you so much, i'm gonna try it.
If you want to work out the constant, use this formula:
constant = object angle range / slider X range.
(it's either that or the other way around, I'm pretty sure ;))