Alice Community  

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

Thread Tools Display Modes
ferris wheel stopping and starting with a button
Junior Member
Status: Offline
Posts: 1
Join Date: Jan 2013
Default ferris wheel stopping and starting with a button - 01-20-2013, 07:20 PM

i can get it to start but i have no clue how to get it to stop. the file is attached. i'm taking an online course and it's only a month long and it's been really difficult learning everything so far but right now i have been trying for over 40 minutes and it seems impossible. please help! thank you!!
Attached Files
File Type: a2w ugh.a2w (297.0 KB, 11 views)
Reply With Quote
Super Moderator
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 01-21-2013, 04:35 PM

Your problem is with the ferrisWheel.spins method.
Once you enter that infinite loop you are stuck there until it ends. You do not need a loop at all because the while ... event will continue to call the new spin method as long as the switch is green (or it will as soon as you move it to the during part of the statement.)

Other observations:
1. Delete the "lightSwitch.turn on" method, sooner or later you will use it by accedent and it will take hours to figure out why your movie no longer works.

2. (Pet Peeve) in "lightSwitch.turnOn" there is no need for the second if statement. The switch will be either green or red and if you already established its not green, there is no need to test if it is red.

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