end battle animtion + hide enemy when event start (problem)

I made a battle event where enemy 2 will appear when enemy 1 died.
I know there this 'must immortal state' to run event when target reaches 0

but the problem is the hide is a delay.
1.png

hide enemy 1 and then enemy 2 appear (set halfway).
but when in battle, enemy 1 didn't go invisible.
go invisible when the event ends, but I still have some... command to proceed. so 2 enemies on the screen.

and also when the event ends. if used skill that has more than 1 repeat, the remaining repeat will proceed after the event end.
take example skill have 5 repeats. the second repeats kill the enemy > event > event end, continue battle animation (strike 3-5).
can't end the animation first before running the event?

Help, any reason why?
why do you hide the enemy at all?
killed enemies vanish, and all you have to do to kill it is remove the immortal state (assuming the troop event triggers on HP=0, and that is the only reason for the immortal state)
why do you hide the enemy at all?
evolve enemy? enemy 1 will transform into 2.
killed enemies vanish, and all you have to do to kill it is remove the immortal state (assuming the troop event triggers on HP=0, and that is the only reason for the immortal state)
2.png
is this how immortal state should be? before the hide script, it was remove immortal state (and I have added state to the enemy in turn 0). even with the state removed, the enemy is still there till the event end.
bump
and also when the event ends. if used skill that has more than 1 repeat, the remaining repeat will proceed after the event end.
even with the state removed, the enemy is still there till the event end.
This is expected behavior. Generally speaking, the game doesn't do two things at a time. So if you are running an event, anything that happens because of something you change (the enemy dying because you took away immortal, etc.) can't happen until the event is done and the game checks what the next thing to do is.
evolve enemy? enemy 1 will transform into 2.
I understand you're not a native English speaker (even though your profile says you are 😉 ), but this is different from what you said in your first post. You originally just said that you wanted the second enemy to appear when the first one died, not that you want to replace the enemy. That is much more complicated.

Here is an example tutorial of how to achieve this effect. In this case, it's being activated by a skill, but you can do the same kind of effect inside the troop event:


I don't know if there's a way to make it not activate inside of a skill that does multiple hits. My only thought on that front would be to use action sequences to program the skill and code it so that if the enemy should die, it stays at 1 HP until the sequence is finished and then you set it to 0.
This is expected behavior. Generally speaking, the game doesn't do two things at a time. So if you are running an event, anything that happens because of something you change (the enemy dying because you took away immortal, etc.) can't happen until the event is done and the game checks what the next thing to do is.
I see... then I can't set event condition only at *target <= 0%* or there will be an interruption. trigger the event in the middle of the repeat... I'll find some way to trigger the event after all actions are finished (battle event least priority).
I understand you're not a native English speaker (even though your profile says you are 😉 ), but this is different from what you said in your first post. You originally just said that you wanted the second enemy to appear when the first one died, not that you want to replace the enemy. That is much more complicated.

Here is an example tutorial of how to achieve this effect. In this case, it's being activated by a skill, but you can do the same kind of effect inside the troop event:


I don't know if there's a way to make it not activate inside of a skill that does multiple hits. My only thought on that front would be to use action sequences to program the skill and code it so that if the enemy should die, it stays at 1 HP until the sequence is finished and then you set it to 0.

yeah, I'm not a native English speaker. bur since worldwide use English... and sometimes I even confuse with my self language.

anyway, about the 2 enemies. enemy 2 appear when 1 die, enemy 2 replace 1. I think they are the same, exchange an old enemy with a new enemy.
I have basic knowledge about action sequences but prevent HP? no. I'm using state resist to prevent death.
I see... then I can't set event condition only at *target <= 0%* or there will be an interruption. trigger the event in the middle of the repeat... I'll find some way to trigger the event after all actions are finished
That was the suggestion I gave you about using an action sequence for the skill that does multiple hits. You could also do it with a state on the enemy that evolves (I think that's actually a more elegant solution, unless you intend to have multiple enemies like this in your game).
I have basic knowledge about action sequences but prevent HP? no. I'm using state resist to prevent death.
Sorry, I'm just not sure what you're saying with this part.

Original thread: https://forums.rpgmakerweb.com/threads/end-battle-animtion-hide-enemy-when-event-start-problem.138028/