View Full Version : Need Help! Play/Pause Button

04-14-2013, 08:56 PM
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.

04-15-2013, 04:29 PM
Do an if else statement and insert a true/false variable. So:
If Paused == True
Turn forwards 1/4 rotations.
Set Paused == False.
Turn backwards 1/4 rotations.
Set Paused == True.