Alice Community  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Trying to create a counter for assignment!
Old
kenny216
Guest
 
Status:
Posts: n/a
Default Trying to create a counter for assignment! - 06-25-2010, 01:29 PM

Disappearing Act: Create a world with an array containing several different types of bugs (Animals / Bugs), other animals, people, or other objects of your choice. Include at least five objects in total. The objects should all move in different random directions. Hint: see the Random motion section in Ch. 6 of Learning to Program with Alice. Setup multiple events (when clicked) for each object that triggers a common method to make the object disappear. Use the IsShowing property to make the objects disappear. Your program should terminate when all bugs are disappear (i.e. have a counter that gets decremented each time a bug disappears).

I already have an array, the different objects moving in random directions, and I even know how to make them disappear when a mouse is clicked on the object. What I don't understand how to do is make a counter that gets decremented each time a bug disappears. Can someone point me in the right direction for creating a counter? Here's my world so that y'all do not think I am cheating or trying to take credit for someone's else work.
Attached Files
File Type: a2w DisappearingAct.a2w (1.76 MB, 47 views)
   
Reply With Quote
 


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.