Destroy All Actor?

Talk about making games.

Destroy All Actor?

Postby SergeLo00001 » Sun Jul 16, 2006 12:00 am

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?
SergeLo00001
 
Posts: 46
Joined: Sun Jul 02, 2006 4:58 am
Score: 0 Give a positive score

Postby Game A Gogo » Sun Jul 16, 2006 12:04 am

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)
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Game A Gogo » Sun Jul 16, 2006 12:09 am

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");
}
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby SergeLo00001 » Sun Jul 16, 2006 12:10 am

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?
SergeLo00001
 
Posts: 46
Joined: Sun Jul 02, 2006 4:58 am
Score: 0 Give a positive score

Postby SergeLo00001 » Sun Jul 16, 2006 12:15 am

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'
??
SergeLo00001
 
Posts: 46
Joined: Sun Jul 02, 2006 4:58 am
Score: 0 Give a positive score

Postby DilloDude » Sun Jul 16, 2006 12:32 pm

On Bullet->collision->any side of ground, put 'DestroyActor("Event Actor")', rather than 'DestroyActor("Bullet");

You need to create an actor integer EnnHealth first.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest