View Single Post
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 05-12-2011, 04:16 PM

To make it keep turning, you use a "When key is pressed" event, and then right click it and change it to "While key is being pressed", and then in the "During" section of that you put code to turn the lock just a very small amount instantly with a duration of close to "0" so that it can happen pretty fast (mess around with duration to make the lock rotate faster or slower). Then you would have to use trigonometry to find the rotation that the lock is currently set to, and use a fraction of the degree angle to calculate approximately what number it would be set at. If you haven't taken trigonometry then you probably don't know how to use the sine, cosine, and tangent functions, so idk how else you could do it easily. Cosine would most likely be used, but idk, im guessing on that one. Its not easy unless you know what your doing.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote