Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Please help!! (http://www.alice.org/community/showthread.php?t=11979)

elc317 05-02-2018 02:23 PM

Please help!!
 
1 Attachment(s)
I am looking for a way to start and stop ferris wheel for a class project using the color of the bump and a 2 button switch. I have attached project, Please help.
Thanks

chickentree 05-02-2018 07:54 PM

1 Attachment(s)
[QUOTE=elc317;58015]I am looking for a way to start and stop ferris wheel for a class project using the color of the bump and a 2 button switch. I have attached project, Please help.
Thanks[/QUOTE]

Events is the right way to do this but you are making it too complex.[LIST=1][*]Create a Boolean in the world. (I called mine "fRun" and initialze it to false.[*]Use the "when the mouse is clicked on the green switch" event to set fRun to true.[*]Create a "when the mouse is clicked on the red button" event and use is to set fRun to false.[*]Change the While event to "while fRun is true"[*]In the While event clear out the begin setting and set the During section to ferriswheelSpin.[*]Take out everything in ferriswheel Spin except the instructions to make the wheels spin.[*]Put all the wheel spin statements within a "Do Together" block.[/LIST]
The fRun Boolean is now controlled by the push buttons on the switch and the event will cause the wheel to spin as long as fRun is true and the world is running.

elc317 05-02-2018 08:59 PM

Thanks Mark! I owe you one


All times are GMT -5. The time now is 02:08 PM.

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