Trying to make a Death Sentence Ability like FF7...

If you know what death sentence is in FF7, the long and short of it is in the thread description.

I'm trying to create a state, that when it wears off, the affected actor or enemy is killed.
I had a look around and found solutions for RMMV using YanFly plugins, but not for RMMZ and VisuStella plugins.

The best/closest I got was this
Spoiler: Link to RMMV solution

Utterly overwhelmed by the VisuStella Plugins. I'm guessing the quick solution is in the Skills and States core. Maybe there's another way though.
There's the VisuStella's Life Effects plugin where you just add the <Doom> notetag in the state's notes, and the affected will die when the state expires.

But if you don't want to buy another plugin, then just add this code to the Death Sentence/Doom state's notes:
Code:
<Reapply Rules: Ignore>
<JS On Expire State>
  const deathState = user.deathStateId();
  if (user.stateRate(deathState) > 0.01 && !user.isStateResist(deathState)) {
    $gameTemp.requestAnimation([user], 65);
    user.setHp(0);
  }
</JS On Expire State>

Replace 65 with the animation id you want to play when the target dies.
The actor/enemy who's effect with this state will have their HP reduce to 0, when the state expires.

I hope this hopes.
Another legendary response. Problem solved! I went with the second option. It seems to work perfectly. Thank you so much. I would have never managed that without your help.

On a side note, I'm thinking of starting a thread with all the quick tips that I've learned. Hopefully people will add their own too. Want to make it easily searchable and highly moderated to avoid tangents (like the one I'm on now). Do you reckon that would be a worthwhile/helpful endeavour?
On a side note, I'm thinking of starting a thread with all the quick tips that I've learned.
Sounds like a cool idea for a thread. If you ever start it, I'll probably contribute a couple things that I've learned/experimented with.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-death-sentence-ability-like-ff7.166971/