How to have "number of" from a list of objects? -
10-22-2009, 11:59 AM
I'm trying to have it so that I can make a function that asks if a number of items from a list of objects are within distance of some other object.
For example, I have a variable with a list of penguin objects. They are all 5 meters away from this other object, a snowman for example. I'm going to have all of these penguin objects move forward towards the snowman, however I'd like it so only 3 are within 3 meters of the snowman. There can't be the entire set of penguins within 3 meters.
So how can I put a limit to the number of objects from a list doing something?
|