View Single Post
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 10-29-2018, 06:20 PM

Quote:
Originally Posted by Retyping View Post
I am working on a textbook assignment with a ferris wheel using a while statement.

Ultimately, I'd like for when the button is pressed to turn green and the ride to continue. Once ANYTHING else is clicked other than the button I would like the ride to stop. However, I'm extremely confused as to how to get this animation to stop.

Could someone give me a bit of feedback?
Thanks!
The reason the ferris wheel won't stop is because in your ferrisWheel.ferrisWheelAnimation method you use a "while true" block. This will cause whatever is inside that while to run forever after it is started. The easiest way to do this is with an event called "while something is true" and then use a boolean to turn the ferris wheel on and off.
Attached Files
File Type: a2w ferrisWheelAns.a2w (263.5 KB, 82 views)


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote