Alice Community

Alice Community (
-   How do I...? (
-   -   Counter for missed objects (

FSavage 11-08-2009 12:12 PM

Counter for missed objects
1 Attachment(s)
I am working through Chapter 5, and our assignment is a continuation of a game we built last week using a cone to catch a torus as it falls. This time we needed to add additional torus objects and keep track of how many are caught as well as how many were missed.

My score for how many are caught seems to work fine, but I can not figure out why my score for how many missed is not counting all of them. I am using if/then statements checking each torus object for it's proximity to the cone as well as it's proximity to the ground, so it does not count a missed torus that did not fall.

I noticed that in the first few rounds, when just 1 torus falls, it will count it as missed if it moves to the right as it falls, but not if it moves to the left as it falls.

If anyone can tell me where my logic is wrong, it would be very helpful. FYI, this assignment also required us to use an array for the torus objects.

All times are GMT -5. The time now is 01:51 PM.

Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.