Troop condition not working?

Hey there.

I'm trying to re-learn RPG Maker and I'm following this tutorial to get a grip about the basics.

Currently, I'm stuck trying to make a boss dissapear after it is defeated.

I tried to pinpoint where the problem is, and I think the problem is in the troop's condition, specially when I want to check if the enemy's HP is 0% or below

This is what I have.


This is the current Troop's condition (The first one is just a message before launching an specific atttack)
1716422448302.png


This is the event:
1716422791337.png



I know Erase event will not permanently delete the event, and for that I should create a new Event Page and activate Self Switch, but still, I don't know how I could do that if I can't seems to be able to detect when the boss is defeated, any idea what could be wrong?
Considering it is not a battle that can be fled from, simply turn the switch on at the start of the battle. There is no need to wait for the HP of the enemy to be zero to trigger it, since that is a required outcome to avoid a game over.

You may need to restructure your event to handle what happens when the switch is on, via another event page. Erasing the event doesn't seem like the right call.
1 - Your troop event isn't happening because the battle ends as soon as the boss dies, the event never has a chance to run. Like @Coolie said, just turn on the switch at turn 0 instead (or do it on the map event, after the Battle Processing command).

2 - Your conditional branch wouldn't doing anything because it's on a page set to event touch. That can't change anything about the event just sitting there on the map, you'd have to run into it a second time.

3 - The correct way to do this is to make a second page on the map event that has no graphics or event commands and is action trigger, and give it the condition of the Dragon Slain switch.
Thanks @Coolie and @ATT_Turan, now I have a better understanding on how the event pages works.

So in the end I just did the following:

1. Remove the conditional branch and just left the battle processing and added a condition to turn self switch A to ON

2. a second event page with nothing in it which is active only if the self switch A is ON.

Now it is working as intended, thanks a lot

Original thread: https://forums.rpgmakerweb.com/threads/troop-condition-not-working.168915/