Page 1 of 1

Collision to Destroy Actors

PostPosted: Sat Jul 02, 2011 10:58 am
by mal99
What is the best way to collide two actors to ensure both are destroyed?

I seem to have tried all the possible collision variations for each of the colliding actors - including specifying destruction of the 'event actor' and 'collide actor'. But, one or other of the actors always remains after the collision.

It doesn't matter to me when in the collision the actors are destroyed so long as they are both gone when it's over.
Would it be better to work with the 'collision finish' event?

Does it make a difference that there are up to 300 actors (moving or stationary) in play and they are very close together?

Any ideas much appreciated.

Thanks

Re: Collision to Destroy Actors

PostPosted: Sat Jul 02, 2011 11:11 am
by skydereign
This is all you should need for code. This should ensure when actor and other_actor collide, they are both destroyed.
actor -> Collision with other_actor -> Script Editor
Code: Select all
DestroyActor("Event Actor");
DestroyActor("Collide Actor");


The quantity of actors, and their proximity, shouldn't have any impact on this.

Here is an example of the above code working, since it sounds like you already tried this but it didn't work.

Re: Collision to Destroy Actors

PostPosted: Sat Jul 02, 2011 8:34 pm
by mal99
Thanks. Hadn't thought of using a script to destroy both actors from one collision event.

I was trying to get each actor to destroy the other with separate collision/destroys - but I guess one actor was always destroyed a fraction before the other, so couldn't complete its destroy action.