Self destruct

I'm trying to find a way to make a bomb enemy explode and damage the party. Like in final fantasy games.

     Any help is greatly appreciated
You could event it into the battle when X happens X skill is used (explosion) which would inflict death onto itself and dealing X damage to the entire party. 

http://prntscr.com/9ecmsl   first have the bomb skill (i think there is a way to set the death of the monster here but i dont know lol)

http://prntscr.com/9ecn8j  then we got the first turn saying bomb started turn 1 then turn two it uses the skill and uses the knockout state. 
how would i make it so that when bomb explodes it does half party's HP in damage
(b.hp * 0.5) would work cuz you are dealing the opponent's hp times 0.5
when i do a test battle the bomb doesnt die the party dies
you sure you have it set to enemy state instead of player state on the troop event?
@inazuma: you set the knockout 100%. There's no way your party can stand that suicidal attack, xD

Back in the RM Ace, I think we could do damage formula

b.mhp / 2; a.die

to deal damage and kill caster. but I cant open RM MV to look for it's equal function.
You need to put the state the attacker is getting before the damage formula a.addState(n); damage formula for skill.

n is the number of the state in the database.
Ah, indeed. I believe that damage formula needs to return a number.

so

a.addState(1); b.mhp/2

should be the correct formula, right?

Edit: just tested this. Our monster sucessfully do self destruct. But it doesn't show collapse animation.

Suggestion: maybe you'll need a plugin XD
Still doesn't work right, if i have add state knockout in skill effect party dies enemy lives
It's not exactly how I want it to happen but I figure out how to get enemy to die, in troops just after using force action for the self destruct skill I did another force action for a dummy skill I made where the scope was the user and effect add state knockout

Original thread: https://forums.rpgmakerweb.com/threads/self-destruct.53013/