Page 1 of 1

dying in multiple hits

PostPosted: Fri Oct 05, 2007 12:02 pm
by elite
Ok, im making a game about Halo and the grunts die 1 hit. I want my arbiter to die infive hits and the brutes to die in 3. How do i do this? :?: :|

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 12:24 pm
by Kalladdolf
make a variable called health. Make sure it's an actor variable.
Create actor -> Script editor
Code: Select all
heatlh = 3;

Collision -> get hit ->
Code: Select all
health-=1;
if(health==0)
{//die action}

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 1:35 pm
by Bee-Ant
...................... :D :D :D :D
Hey Kall, if you give a code, please more specific...moreover for new user. It just will make them confused...for example

Enemy actor, on Collision event with player bullet :
Code: Select all
EnemyHealth--;
if(EnemyHealth==0)
{
    ChangeAnimation("EventActor", "Die", FORWARD);
    Score.textNumber=Score.textNumber+10; //etc...
}

:D :D :D

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 1:45 pm
by elite
collision, "get hit"?

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 1:47 pm
by Bee-Ant
elite wrote:collision, "get hit"?

He means :
EnemyActor..CollisionEvent>PlayerBullet>NoRepeat>ScriptEditor>(See my code)

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 1:49 pm
by Bee-Ant
Btw I have posted a demo about your jumping problem...check your Jumping topic in General :D

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 2:44 pm
by Kalladdolf
ooops, sorry! :D

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 3:13 pm
by Bee-Ant
==Kalladdolf== wrote:ooops, sorry! :D

Be careful with new user... :D

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 3:24 pm
by Kalladdolf
I'm a new one, too! :o :o

:lol:

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 3:32 pm
by Bee-Ant
I mean new user who isn't well known with codes... :D or whatever you call it.. :D

Re: dying in multiple hits

PostPosted: Fri Oct 05, 2007 3:58 pm
by Kalladdolf
I know, just talkin' u nuts :D