"kamikaze" enemy

AngelAC

New member
Hi guys, i hope you are well. I was wondering how i could create an enemy that destroys itself after he explodes. So bassically the enemy runs to the player and when is close enough explodes.
 
That's easy, you either use attackbox in enemy's WALK animation which will follow up to a FOLLOW animation to do the kamikaze attack.
Or use regular ATTACK animation in which enemy do the kamikaze attack.

Either way you need script like below to remove the enemy after attack is done:
Code:
anim	attack1
	range	20 45
	delay	15
	offset	120 154
	bbox	100 70 50 87
	frame	data/chars/jake/kick1.png
	delay	10
	attack  124 72 50 60 15 1 0 0 10
	frame	data/chars/jake/kick2.png
	delay	20
	attack  0
	frame	data/chars/jake/kick3.png
	delay	12
	@cmd	killentity getlocalvar("self")
	frame	data/chars/jake/kick1.png
 
Back
Top Bottom