test getAllActorsInCollision specific actors

Hello all,
I am trying to move certain actors in a collision and not others.
how would you test the array returned by getAllActorsInCollision for a specific actor? In the demo collisionGroups.ged there are actors c1, c2 and c3. how would could you modify the code to only pick up actors c1 and c2 and their clones? The original script is as follows:
I am trying to move certain actors in a collision and not others.
how would you test the array returned by getAllActorsInCollision for a specific actor? In the demo collisionGroups.ged there are actors c1, c2 and c3. how would could you modify the code to only pick up actors c1 and c2 and their clones? The original script is as follows:
- Code: Select all
int n;
Actor *actors;
actors = getAllActorsInCollision("Event Actor", &n);
score.textNumber = n;
if(actors)
{
int i;
for(i = 0; i < n; i++)
{
ChangeParent(actors[i].clonename, "Event Actor");
}
}