Alice Community

Alice Community (
-   Share Worlds (
-   -   Need Help! Play/Pause Button (

akatsume 04-14-2013 08:56 PM

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.

bob3584 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.

All times are GMT -5. The time now is 12:06 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.