Something like this:
- Code: Select all
if(All_actors_On_Screen)
{
All_actors.r=255;
etc...
}
if(All_actors_On_Screen)
{
All_actors.r=255;
etc...
}
From GE Script documentation wrote:getAllActorsInCollision: Returns an Actor's array that includes all Actors that collide with the cloneName if successful or NULL if there are no collisions.
Actor count will be returned in nActors.
Actor *getAllActorsInCollision(char *cloneName, int *nActors)
cloneName: nameactor.cloneindex (Ex.: ship.1, ship.2, ...), "Event Actor", "Collide Actor", "Parent Actor" or "Creator Actor"
The returned array will be valid until the next call to getAllActorsInCollision.
The returned array is read only.
Script Editor Syntax:
getAllActorsInCollision("Event Actor",&num);
For Example, to make the "Event Actor" the parent of all the colliding actors:
- Code: Select all
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");
}
}
Users browsing this forum: No registered users and 1 guest