Troop Event Won't Run

I'm trying to create a boss fight that periodically pauses and forces players to complete a puzzle on the map in order to prevent the boss from regaining HP. The boss uses an ability that stores the damage he's taken so far as the variable "Angel HP", ends the battle, and turns on a switch called "Angel Intermission". Players have one minute to complete the puzzle, then they engage the boss in battle again.

At that point, I want to trigger this event, which subtracts the damage already done to the boss from his HP (since when the new battle begins the boss is back at his starting HP) then restores some of his HP based on the results of the puzzle. But it isn't running.

I've confirmed using F9 that the "Angel Intermission" switch is "Off" before the players first engage the boss and is turned on properly when the puzzle begins. It seems like I can't use F9 to confirm that the switch is on during the fight, but I've checked to make sure I'm not accidentally turning it somewhere. I've also confirmed that the

I've tried changing Span to Moment/Battle/Turn, but the event won't run under any of those settings. Is there anything wrong with these settings? Anything else you can think for me to check for errors? Thanks for any help you can offer!

event.png
If that event is only supposed to correct the enemy HP in the later battles, try running it on Turn 0 only, span = battle.


However, I think that you made a mistake with the mathematics.


Is the number in Variable 20 supposed to be positive or negative, and where is it set?


Because it's extremely convoluted to change it from positive to negative and then substract the number - if HP Angel starts positive, the enemies are healed by that amount and since they are already at maximum HP at the beginning, it only appears as if the event doesn't run...
Still don't understand why it wasnt working before, but that seemed to do the trick, thanks.

The math may be convoluted, but it's working as intended (though I may have explained badly). The boss starts with 2000 HP. When the battle is interrupted, the variable stores his current HP. When the battle resumes, I subtract 2000 from the variable, multiply by -1, then subtract that amount from his starting HP.

Thanks again for your help!

Original thread: https://forums.rpgmakerweb.com/threads/troop-event-wont-run.35760/