As long as you avoid using it in auto-battles (because of a weird thing regarding evaluation of damage formulas) this is possible using the damage formula itself, like so:
JavaScript:
a.setHp(0); a.atk
a.addState(1); a.atk
The first part kills the user, and the second is the damage section, to be replaced with whatever you like.
It's been awhile since I've gone through RPGMaker, and writing code is not my specialty here. So, I feel kinda stupid for asking this, but where exactly do I put this code?
When I put it in the Script section of the event commands it spits out an error saying that "a" is undefined.
When I put it in the Notes section, nothing happens, and when I stick it in the damage formula section, the move doesn't work at all.
Same goes for this stuff:
<JS Post-Damage>
user.gainHp(-user.hp);
user.performCollapse();
</JS Post-Damage>
The closest thing that works is when I go in and say:
"Change Enemy HP: #1, -9999
or
Change Enemy State: #1, + Dead.
Problem is, the enemy using it won't always be in the #1 slot. So it could either kill the wrong enemy if the #1 enemy is alive, or do nothing if the #1 enemy is already dead. How do I make it kill the user? (Enemy attack by the way)