Alice Community  

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Getting the best of me...
Posts: n/a
Default Getting the best of me... - 11-09-2006, 10:52 AM

Just wanted to know if anyone had done (page 199) Chapter 7: Repetition Exercise 8 (speed control). The just of it is placing a fan into a world and writing methods for each button on the fan for different speeds, you have to use nested ifs/whiles to make sure the blades continue to turn until the animation stops or the off button is clicked. I have been working on this for about a week now, I have all methods written and all events set to them so when they are clicked they run. I wrote a method I called fan.buttonClick to simulate the buttons actually being pressed. The only problem is the function I wrote to tell the ifs/whiles that they were true is getting the best of me, I have tried numerous types of functions but haven't found one yet that will work. Also now it seems that my off method isn't working, anyway to make something false so that the if/while statements will just stop everything when I click off? Any thoughts or suggestions on this would be much appreciated.
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.