Need Help! Play/Pause Button
I need help in writing a code for a switch object similar to the play/pause function. I know the event handler for it would be if the mouse is clicked on the certain object do "this". I know how to make it turn forward 1/2 revolutions when the handle is clicked. But my problem is I want it to turn 1/2 revolutions backwards if I click it again. I'm having a hard time on this matter. Can someone please help! I'm new to alice and I really need help on this matter. Thank you.
|
Do an if else statement and insert a true/false variable. So:
If Paused == True Turn forwards 1/4 rotations. Set Paused == False. Else Turn backwards 1/4 rotations. Set Paused == True. |
All times are GMT -5. The time now is 05:57 PM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.