Page 1 of 1

Destroy All Actor?

PostPosted: Sun Jul 16, 2006 12:00 am
by SergeLo00001
Ok i have this guy shooting a gun,
The ground has a collision event on the bullet and then destroy actor bullet.
But heres my problem, if i shoot more than one bullet in a row and only one of them hits the groun, all of them get destroyed, any way i can fix this?
Also if i have 2 of the same type of monsters in the game, if one of them gets shot all of them die. Also the same type of problem.
Someone please help.
Thanks ahead.

O, and a side question, how to make it so the enemy gets destroyed after two shots not one?

PostPosted: Sun Jul 16, 2006 12:04 am
by Game A Gogo
if the destroy event is on the ground, insted of using Bullet.0 or Bullet, use coliding actor, or if it is on the bullet it self, use event actor (its the default)

PostPosted: Sun Jul 16, 2006 12:09 am
by Game A Gogo
and for the health, use a var. create one in the script editor, mke sure its actor only! and on create actor
Code: Select all
EnnHealth=2;
and on colision whit bullet:
Code: Select all
EnnHealth-=1;
if(EnnHealth<1)
{
DestroyActor("EventActor");
}

PostPosted: Sun Jul 16, 2006 12:10 am
by SergeLo00001
ur sayin instead of the ground having collision event, make the bullet have it? couse it didnt work, im sure thats not what u meant.
Could you explain i little easier?

PostPosted: Sun Jul 16, 2006 12:15 am
by SergeLo00001
I try to put in on the enemy
Create actor->Script editor->
Code: Select all
EnnHealth=2;

and it tels me
Error line 1: Incompatible types: cannot convert from 'const int' to 'identifier'
??

PostPosted: Sun Jul 16, 2006 12:32 pm
by DilloDude
On Bullet->collision->any side of ground, put 'DestroyActor("Event Actor")', rather than 'DestroyActor("Bullet");

You need to create an actor integer EnnHealth first.