View Single Post
Counter for missed objects
Old
FSavage
Guest
 
Status:
Posts: n/a
Question Counter for missed objects - 11-08-2009, 12:12 PM

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.
Attached Files
File Type: a2w Lab4.a2w (404.5 KB, 20 views)
   
Reply With Quote