Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Please help!!
Old
elc317
Junior Member
 
Status: Offline
Posts: 2
Join Date: Apr 2018
Default Please help!! - 05-02-2018, 02:23 PM

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
Attached Files
File Type: a2w _Project7.a2w (203.5 KB, 19 views)
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 05-02-2018, 07:54 PM

Quote:
Originally Posted by elc317 View Post
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
Events is the right way to do this but you are making it too complex.
  1. Create a Boolean in the world. (I called mine "fRun" and initialze it to false.
  2. Use the "when the mouse is clicked on the green switch" event to set fRun to true.
  3. Create a "when the mouse is clicked on the red button" event and use is to set fRun to false.
  4. Change the While event to "while fRun is true"
  5. In the While event clear out the begin setting and set the During section to ferriswheelSpin.
  6. Take out everything in ferriswheel Spin except the instructions to make the wheels spin.
  7. Put all the wheel spin statements within a "Do Together" block.

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.
Attached Files
File Type: a2w Proj7_V1.a2w (158.1 KB, 59 views)


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
elc317
Junior Member
 
Status: Offline
Posts: 2
Join Date: Apr 2018
Default 05-02-2018, 08:59 PM

Thanks Mark! I owe you one
   
Reply With Quote
Reply

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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.