Hello everyone, i need help to make a skill that will repeat itself to another target if the current target dies.
For example, i use the skill to kill enemy A, if the enemy A dies, i will perform the skill again to random alive enemies.
I came up with the following code:
<Post-Damage Eval>
if(target.hp <= 0){
target._immortalState = false;
target.performCollapse();
BattleManager.queueForceAction(user, 32,
$gameTroop.aliveMembers()[Math.randomInt($gameTroop.aliveMembers().length)]);
}
</Post-Damage Eval>
But the problem is, while the skill succeed to repeat itself, the dead enemy battler wont dissappear/collapse.
I tried to change target.hp <= 0 with target.isDead(), the dead enemy dissappear but the skill wont repeat.
I cant think of another way to achieve this lol, perhaps someone who is more familiar with MV can help me.
Thank you for reading.