Iterating through clones in a for loop
Posted: Tue Aug 01, 2006 12:53 am
Hi everyone,
I'm trying to calculate the distance between an actor and some clones of another actor, but I can't figure out how to do it properly.
Here's what I'm trying to do, roughly:
int i;
for (i = 0; i < 30; i++)
{
Actor* testActor = someActor.i;
if distance(x, y, testActor->x, testActor->y) //this is the problem, I think
{
//Do some stuff;
}
}
Any ideas?
Any help is much appreciated.
I'm trying to calculate the distance between an actor and some clones of another actor, but I can't figure out how to do it properly.
Here's what I'm trying to do, roughly:
int i;
for (i = 0; i < 30; i++)
{
Actor* testActor = someActor.i;
if distance(x, y, testActor->x, testActor->y) //this is the problem, I think
{
//Do some stuff;
}
}
Any ideas?
Any help is much appreciated.