remap death animation without using attackboxes

afhc2x17

Active member
Hi again, I have another problem with a scripted grab:

The animation is a grab and multi-punch, and I want the attack to finish with another death animation (i.e. I have a default death, I want the attack to finish with death41 if it kills the entity) without using attack(#) due to me using a scripted grab (I'm from a cellphone right now so I can't post the mod here right now), it is possible? Sorry if I can't explain better, I just want to change the default death to another one if this grab kills the entity.

Code:
anim attack2
	range	0 35
	delay	25
	offset  62 125
        frame	data/chars/burglar/punch11.png
	@cmd	slamstart
	@cmd	bind 1 27 -1 28 -1
	@cmd	forceanim "ANI_PAIN13" 0
	frame	data/chars/burglar/grab01.png
        delay   20
        frame	data/chars/burglar/grab11.png
	delay	20
	frame	data/chars/burglar/grab01.png
        delay   20
        frame	data/chars/burglar/grab11.png
	delay	20
	frame	data/chars/burglar/grab01.png
        delay   20
        frame	data/chars/burglar/grab11.png
	delay	25
        frame	data/chars/burglar/grab11.png
	@cmd	hurt 4
	@cmd	forceanim "ANI_PAIN12" 0
	sound	data/sounds/heavy.wav
        frame	data/chars/burglar/grab12.png
	delay	25
        frame	data/chars/burglar/grab11.png
	@cmd	hurt 4
	@cmd	forceanim "ANI_PAIN12" 0
	sound	data/sounds/heavy.wav
        frame	data/chars/burglar/grab12.png
	delay	25
        frame	data/chars/burglar/grab11.png
	@cmd	hurt 4
	@cmd	forceanim "ANI_PAIN12" 0
	sound	data/sounds/heavy.wav
        frame	data/chars/burglar/grab12.png
	delay	25
        frame	data/chars/burglar/grab11.png
	@cmd	hurt 4
	@cmd	forceanim "ANI_PAIN12" 0
	sound	data/sounds/heavy.wav
        frame	data/chars/burglar/grab12.png
	delay	25
        frame	data/chars/burglar/grab11.png
	@cmd	hurt 4
	@cmd	forceanim "ANI_PAIN12" 0
	sound	data/sounds/heavy.wav
        frame	data/chars/burglar/grab12.png
	delay	50
	@cmd	bind 0 0 0 0 0
        @cmd    finish 0 -1 1 0 0
	@cmd	forceanim "ANI_FALL3" 0
	delay	18
	@cmd	clearL
        frame	data/chars/burglar/punch11.png
Thanks in advance and wash your hands.
 
Instead of

Code:
	@cmd	forceanim "ANI_FALL3" 0

Use

Code:
	@cmd	forceanim "ANI_FALL41" 0

Or the same number of fall as the death you want.

If it is not a possibility for you, you will have to do it via script at the beginning of the movement. I think it would be simple, but I don't know how, I'm not good with scripts
 
Already did it, hoping that the fall animation would lead into the respective death animation, but it always defaults to the regular death, even if the fall animation plays.
 
afhc2x17 said:
Already did it, hoping that the fall animation would lead into the respective death animation, but it always defaults to the regular death, even if the fall animation plays.

Hi afhc2x17 . Is the script "@cmd hurt" using the function "damageentity"? If yes, try to change the attacktype like this:
Code:
damageentity(target, self, damage, 1, openborconstant("ATK_NORMAL41"));

Here is the manual description:
damageentity(entity, other, force, drop, type)
~Damage the entity.
~'entity' is the entity you want to damage.
~'other' who damage this entity, can be itself, if you specify a player's entity, score will be added. Default to the entity itself.
~'force' is the attack force. default to 1.
~'drop' is whether the attack knocks down the entity.
~'type' attack type, e.g., a shock attack or attack1-10, see openborconstant, the constants starts with 'ATK_'
 
I use this hurt script with code not dependent of the attack type, if you are interested. Very useful because it does not kill the enemy or alter its animations

Code:
void hurt(int Damage)
{ // Damage opponent if health is higher than 20
	void self = getlocalvar("self");
	void target = getentityproperty(self, "opponent");

   if(target!=NULL())
   {
     void THealth = getentityproperty(target,"health");
     if(THealth > 20)
     {
       changeentityproperty(target, "health", THealth - Damage);
     }
   }
}
 
Back
Top Bottom