A skill that summons new actors upon killing monsters

I'm trying to make a skill similar to Pokemon, where if it kills the enemy, it replaces the actor with another actor.

Does anyone have any tips on how to make the same skill summon different actors depending on the enmy destroyed?

For instance, if the skill kills a human enemy, it summons a skeleton.
If it kills a beast enemy, it summons a dog skeleton.
If it kills a magic enemy, it summons a shadow, etc.

Ideally, the skill needs to deal the finishing blow and then summon the actor/delete the existing one. I can get it to set a switch in the battle script when the enemy health falls to say, 20%, but then if the skill kills a different enemy it'll summon the wrong one.

Any tips? (Didn't think there were any screenshots that could elaborate)
I'm a bit confused because you're mixing terminology.

You talk about destroying an enemy and summoning an actor. Do you actually mean when you destroy an enemy it summons another enemy?

Per the database tabs, Actors are the objects that go into your party. Enemies are the things you fight against using actors.

If you want to summon another enemy after killing one, you can use troop events in combination with a couple of HimeWorks plugins: End Phase Triggers (so the battle doesn't end before your troop event goes off) and Enemy Reinforcements.
I'm a bit confused because you're mixing terminology.

You talk about destroying an enemy and summoning an actor. Do you actually mean when you destroy an enemy it summons another enemy?
I think i have this right - I don't want to summon an enemy, I want to summon an actor. Another party member. The trick is the trigger is to kill the enemy to get the actor to appear (and dismiss the actor that killed the enemy)

The flavour is a soul that turns into different undead monsters when it uses a certain skill on enemies.
Per the database tabs, Actors are the objects that go into your party. Enemies are the things you fight against using actors.

If you want to summon another enemy after killing one, you can use troop events in combination with a couple of HimeWorks plugins: End Phase Triggers (so the battle doesn't end before your troop event goes off) and Enemy Reinforcements.
I think End Phase triggers is the answer, actually, as I can set a battle condition to activate a switch when the enemy is dead, which doesn't work otherwise as the skill's already happened.

Ideally it needs to work when it kills the last enemy as well so that the new actor sticks around after the battle.
I think i have this right - I don't want to summon an enemy, I want to summon an actor. Another party member. The trick is the trigger is to kill the enemy to get the actor to appear (and dismiss the actor that killed the enemy)
Okay! You can still mostly do this with troop events to Change Party Members. You'd have to do something else to remove the actor that killed the enemy.

You could do some complicated finagling with common events on skills, but it would be easier to use Yanfly's Buffs & States and Auto Passive States.

Give your necromancer-or-whatever a passive state that has the notetag:
Code:
<Custom Conclude Effect>
if (this.isDamage() && target.isDead())
    $gameParty.removeActor(user.actorId());
</Custom Conclude Effect>

Original thread: https://forums.rpgmakerweb.com/threads/a-skill-that-summons-new-actors-upon-killing-monsters.168444/