Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Thread Tools Display Modes
Need Help! Play/Pause Button
Posts: n/a
Exclamation 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.
Reply With Quote
Senior Member
Status: Offline
Posts: 180
Join Date: Jan 2013
Location: In a Cardboard Box.
Default 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.

My avatar will always be a preview of what I am currently working on.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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