Alice Community  

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

Thread Tools Display Modes
Posts: n/a
Red face Counter? - 01-09-2011, 09:35 PM

I am having trouble setting up a counter to keep track of the number of rings caught and missed in a ring toss game. Can anyone help me? Thank You.
Reply With Quote
Posts: n/a
Default 01-10-2011, 01:11 AM

Experiment with the objects' proximity functions and test the results. For example
missVariable = 0
hitVariable = 0 (create variables with initial values)
At a certain time or at timing of some event, (such as after each torus.move down statement?)

If torus is within thisMany meters of cone
hitVariable = hitVariable++ (will increment hitVariable by 1);

Else missVariable++

You will have to test this with the different proximity functions using different small numbers of or fractions of meters to find results which will work for you; there should be a few different combinations which would do the job.
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 ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.