die!!!!!!!!!

Non-platform specific questions.

die!!!!!!!!!

Postby jagheera nex » Tue Sep 11, 2007 1:49 am

im making a stick figure game for fun and there are enimies and when you attank one, buy walking up to one and pressing down, his helth goes above his head its just numbers, well how do i make it so when his health is 0 the animation changes and he falls to the ground, bam! :P
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score

Re: die!!!!!!!!!

Postby DocRabbit » Thu Sep 13, 2007 2:21 pm

In your key down event or whatever your attacking event is, evaluate his health value against 0.
Code: Select all
if (youractorshealth<1)
{
ChangeAnimation("youractor","actordeadanimation",STOPPED)
}


You may also wish to do a little more here like actually destroying your actor, adding your scoring as a result of killing the actor, create a new dead actor, start a timer for length of dead actor visible, etc.....

If you do these things, do the destroy actor last...
User avatar
DocRabbit
 
Posts: 114
Joined: Fri Oct 27, 2006 2:56 am
Score: 10 Give a positive score

Re: die!!!!!!!!!

Postby jagheera nex » Tue Sep 18, 2007 3:19 am

thanks man :D
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest