killentity entity if get a hit? (type none)

dantedevil

Well-known member
Hello!

I have a character with a special like M. Bison Psycho Crusher.
The Character spin cover in flames.
The flames set in spawbind.
All works ok.
The problem is when enemies hit the character in middle of the special, the hero shows the fall amim and the flames still show the rest of the animation.

How can kill the flames when the hero gets a hit?

Here the txt:

Hero's Move
Code:
anim freespecial3
	loop       0
	delay	5
	offset	98 173
	bbox	84 90 20 84
        @cmd    spawnbind "EFlame" -18 49 1
	frame	data/chars/caro/ball1.png
	frame	data/chars/caro/ball1.png
	frame	data/chars/caro/ball1.png
	frame	data/chars/caro/ball1.png
	delay	 5
        @cmd    spawnbind "carofl1" 33 43 1
        frame     data/chars/caro/rise2.png
        sound     data/chars/caro/special.wav
        hitflash  smoky
        blockfx   data/sounds/hitfire.wav
        blockflash  smoky
 	delay      2
	move       6
        attack29   73 109 88 43 20 1 0 0 25
	bbox	   60 120 92 20
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        move       4
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        move       3
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        move       2
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        move       1
        frame      data/chars/caro/spec2.png
        attack 	   0 0 0 0 0 0 0 0 0
        frame      data/chars/caro/spec2.png
        delay      12
        move       0
        frame      data/chars/caro/rise2.png

Flames
Code:
Name	carofl1
type	none
shadow  	0
lifespan  	1
nomove  	1
nolife          1
antigravity     100
alpha 1


anim idle
	loop       0

	Delay	5
	offset	128 133
	Frame	data\chars\caro\flames\carof000.png
	Delay	4
	OffSet	66 24
	Frame	data\chars\caro\flames\carof100.png
	OffSet	71 25
	Frame	data\chars\caro\flames\carof101.png
	OffSet	74 22
	Frame	data\chars\caro\flames\carof102.png
	OffSet	78 21
	Frame	data\chars\caro\flames\carof103.png
	OffSet	76 23
	Frame	data\chars\caro\flames\carof104.png
	OffSet	75 27
	Frame	data\chars\caro\flames\carof105.png
	OffSet	81 23
	Frame	data\chars\caro\flames\carof106.png
	OffSet	76 22
	Frame	data\chars\caro\flames\carof107.png
	OffSet	74 24
	Frame	data\chars\caro\flames\carof108.png
	OffSet	82 24
	Frame	data\chars\caro\flames\carof109.png
	OffSet	66 24
	Frame	data\chars\caro\flames\carof100.png
	OffSet	71 25
	Frame	data\chars\caro\flames\carof101.png
	OffSet	74 22
	Frame	data\chars\caro\flames\carof102.png
	OffSet	78 21
	Frame	data\chars\caro\flames\carof103.png
	OffSet	76 23
	Frame	data\chars\caro\flames\carof104.png
	OffSet	75 27
	Frame	data\chars\caro\flames\carof105.png
	OffSet	81 23
	Frame	data\chars\caro\flames\carof106.png
	OffSet	76 22
	Frame	data\chars\caro\flames\carof107.png
	OffSet	74 24
	Frame	data\chars\caro\flames\carof108.png
	OffSet	82 24
	Frame	data\chars\caro\flames\carof109.png
	Frame	data\chars\misc\0empty.png

Thanks.
 
Thanks!

I found this:
bindentity(entity, target, int x, int z, int a, int direction, int bindanimation)
~Bind entity to target, so the target moves, the entity moves.
~x, z, a: relative to target.
~direction: 0 no change 1 same direction as target -1 opposite direction as target 2 always right -2 always left
~bindanimation: 0 No effect. 1 Keep same animation as the target. 2 Also keep same frame as the target. 4 Kill the entity if the animation doesn't match.
~To unbind a entity, use bindentity(entity, NULL());
~Notice: You can combine those values for bindanimation, so it can be 6 which means 2 and 4.

I have all the info here, but i dont have the bindentity script.

A some example to use it will be nice, thanks.
 
Thanks for the link.

I try after read all and now the flames dont work!

I check the two animations, everyone are the the same in every numer of frames and delay, but the flame if killed for the set 4 i guess.
If i set 0 in the last place the flames shows ok.

Here the text:
Code:
anim freespecial3
	loop       0
	delay	5
	offset	98 173
	bbox	84 90 20 84
        @cmd    spawnBind "carofl1" 33 43 1 1 4
	frame	data/chars/caro/ball1.png
	frame	data/chars/caro/ball1.png
	frame	data/chars/caro/ball1.png
	frame	data/chars/caro/ball1.png
	delay	 5
        frame     data/chars/caro/rise2.png
        sound     data/chars/caro/special.wav
        hitflash  smoky
        blockfx   data/sounds/hitfire.wav
        blockflash  smoky
 	delay      2
	move       6
        attack29   73 109 88 43 20 1 0 0 25
	bbox	   60 120 92 20
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special0.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special2.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        frame      data/chars/caro/special4.png
        move       4
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        move       3
        frame      data/chars/caro/special6.png
        frame      data/chars/caro/special6.png
        move       2
        frame      data/chars/caro/spec2.png
        frame      data/chars/caro/spec2.png
        move       1
        frame      data/chars/caro/spec2.png
        attack 	   0 0 0 0 0 0 0 0 0
        frame      data/chars/caro/spec2.png
        delay      5
        move       0
        frame      data/chars/caro/rise2.png
        delay      7
        frame      data/chars/caro/rise2.png

Flames:
Code:
Name	carofl1
type	none
shadow  	0
lifespan  	1
nomove  	1
nolife          1
antigravity     100
alpha 1


anim idle
	loop    0
	delay	5
	offset	30 13
	frame	data/chars/misc/0empty.png
	frame	data/chars/misc/0empty.png
	frame	data/chars/misc/0empty.png
	frame	data/chars/misc/0empty.png
	delay	 5
        frame   data\chars\caro\flames\carof000.png
	delay	 2
        frame   data\chars\caro\flames\carof100.png
        frame   data\chars\caro\flames\carof100.png
        frame   data\chars\caro\flames\carof101.png
        frame   data\chars\caro\flames\carof101.png
        frame   data\chars\caro\flames\carof102.png
        frame   data\chars\caro\flames\carof102.png
        frame   data\chars\caro\flames\carof103.png
        frame   data\chars\caro\flames\carof103.png
        frame   data\chars\caro\flames\carof104.png
        frame   data\chars\caro\flames\carof104.png
        frame   data\chars\caro\flames\carof105.png
        frame   data\chars\caro\flames\carof105.png
        frame   data\chars\caro\flames\carof106.png
        frame   data\chars\caro\flames\carof106.png
        frame   data\chars\caro\flames\carof107.png
        frame   data\chars\caro\flames\carof107.png
        frame   data\chars\caro\flames\carof108.png
        frame   data\chars\caro\flames\carof108.png
        frame   data\chars\caro\flames\carof109.png
        frame   data\chars\caro\flames\carof109.png
        frame   data\chars\caro\flames\carof100.png
        frame   data\chars\caro\flames\carof100.png
        frame   data\chars\caro\flames\carof101.png
        frame   data\chars\caro\flames\carof101.png
        frame   data\chars\caro\flames\carof102.png
        frame   data\chars\caro\flames\carof102.png
        frame   data\chars\caro\flames\carof103.png
        frame   data\chars\caro\flames\carof103.png
        frame   data\chars\caro\flames\carof104.png
        frame   data\chars\caro\flames\carof104.png
        frame   data\chars\caro\flames\carof105.png
        frame   data\chars\caro\flames\carof105.png

        frame   data\chars\caro\flames\carof106.png
	frame	data\chars\caro\flames\carof106.png

	frame	data\chars\caro\flames\carof107.png
	frame	data\chars\caro\flames\carof107.png

	frame	data\chars\caro\flames\carof108.png
	frame	data\chars\caro\flames\carof108.png

	frame	data\chars\caro\flames\carof109.png

	frame	data\chars\caro\flames\carof109.png
        delay   5

        frame   data\chars\caro\flames\carof000.png
        delay   7
	frame	data\chars\misc\0empty.png
 
Oh you must rename IDLE in carolf1's text to FREESPECIAL3. IOW animation name must match parent entity's
 
yes, it must match the name.
Sorry for my quick post on my last reply, I was on my mobile.

The script works fine, but keep in mind that bindentity has a bug and  maybe you could see some entities (like hitsparks/flash) which doesn't disapears. Its an engine bug.
 
Back
Top Bottom