Actor *getAllActorsInCollision(char *cloneName, int *nActors)
cloneName: nameactor.cloneindex (Ex.: ship.1, ship.2, ...), "Event Actor", "Collide Actor", "Parent Actor" or "Creator Actor"
Return actor's array with all actors colliding with cloneName if success or NULL if there are no collisions the
Actor count will be returned in nActors
The returned array will be valid until the next call to getAllActorsInCollision
The returned array is read only.
For Example, to make the "Event Actor" the parent of all the colliding actors:
int n;
Actor *actors;
actors = getAllActorsInCollision("Event Actor", &n);
if(actors)
{
int i;
for(i = 0; i < n; i++)
{
ChangeParent(actors[i].clonename, "Event Actor");
}
}
I can't seem to get this to work.
In which event would I use the example script? Can it be used in any event?
A demo would be nice!