Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   Need Help! Play/Pause Button (http://www.alice.org/community/showthread.php?t=10035)

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.
Else
Turn backwards 1/4 rotations.
Set Paused == True.


All times are GMT -5. The time now is 01:49 AM.

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