Page 1 of 1

Enemy health problems

PostPosted: Mon Dec 03, 2007 10:27 pm
by jimmynewguy
In my game you are a knight. I want it to be where you swing you sword and the mage losses health, this would be easy, however the mage has clones so is there any way where its the colliding actor who losses health? Because right now when I attack a clone they have to die in order so 1 dies then 2 ext. Any help will be greatly appreciated. :D
Code: Select all
if(animindex == getAnimIndex("swingl_01") ||
   animindex == getAnimIndex("swingr_01"))
 
   {
    mage.healthe-=1;
   }
   
else
{
    PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000, 1.000000, 0.000000, 1.000000);
}

Re: Enemy health problems

PostPosted: Tue Dec 04, 2007 1:50 am
by Super Pieman
put the script into the mage instead of the knight. that should work.

Re: Enemy health problems

PostPosted: Tue Dec 04, 2007 8:50 pm
by jimmynewguy
no, that doesn't work. the knight can't hurt the mage unless his in his swing animations. is there some way to check if hes in these animations from the mages script? thx :D

Re: Enemy health problems

PostPosted: Tue Dec 04, 2007 9:48 pm
by Super Pieman
im not sure but have you tried putting "knight.swingl_01"
and same with right