Page 1 of 1

die!!!!!!!!!

PostPosted: Tue Sep 11, 2007 1:49 am
by jagheera nex
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

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

PostPosted: Thu Sep 13, 2007 2:21 pm
by DocRabbit
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...

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

PostPosted: Tue Sep 18, 2007 3:19 am
by jagheera nex
thanks man :D