Troop event when actor HP > 70% max HP

Hi everyone!
I have a character who changes appearance and class when their HP <= 70% max HP
I want this character to revert their appearance and class when their HP goes back over 70% of max HP.
So I did this for the first transformation (I tested it, it works)
1775047295947.png

And I tried this for the revert but it is not working:
1775047359588.png

I posted the screenshot to show the condition, here is the code:
"◆If:Class of Songe is Songe Forme 2
◆If:Script:($gameActors.actor(7).hp>$gameActors.actor(7).mhp*0.7) {
◆Wait:30 frames
◆Text:None, None, Window, Bottom
: :Songe change de forme.
◆Change Actor Images:Songe, Evil(5), Evil(5), Actor3_5
◆Change Class:Songe, Songe, true
◆Wait:30 frames
◆
:End
◆
:End"

(please don't pay attention to pages 3 and 4, when this works I want to do the same for a second form when HP < 30%)

Can someone please help me ?
You have the span on battle, they only run once per battle.
You have the span on battle, they only run once per battle.
Thanks !
I changed it and tried a to make it work with switches but didn't succeed.
So first I added a event page for Turn 0 to set the switches ON (with span Battle so it begins)
1775054666724.png

Then I did this for the 1st form (it works)
1775054700843.png

And for the revert, I did this:
1775054755549.png


My idea was to check each turn if HP > 70% max HP. But it creates a new issue. My character has a skill which calls a commen event (thanks to VisuStella Battle Core pluggin) and when I put the span on "Turn" it freezes the fight whenever my character tries to use the skill.
Basically my idea with this character is that they have skills to self inflicts HP damage, ATK buff and AGI debuff.
So you can force the character to change form and class with this skill (in addition to ennemy damage)
So I tried to change the span to this, but it creates the same issue.
1775054995303.png

So I tried to add another switch like this
1775055272088.png

1775055308956.png

But now the battle is stuck when the new switch "PV Songe" is ON
I double checked and the character in question is number 7
1775055627488.png
The condition is set to "Don't run" in the third screenshot.
The condition is set to "Don't run" in the third screenshot.
Yes so I tried other things, the 4th and 6th screens but it is still not working
I thought that the span "Turn" was executing it every turn without taking into account the conditions ?
So I just tried with this
1775117573336.png

But it's still not working. The first transformation works but not the revert when I heal the character
UPDATE It works !
OMG ! It works !
So what I did was set up 3 variables

Page 1 : Span turn 0
Var 1 = Max HP
Var 2 = threshold
Var 3 = Current HP
(still in page 0)
Var 2 = Var 1 *0.7
For the switches
Swith Transform is ON
Switch revert is OFF

Page 2 : Span = Turn : Conditions = Turn 1*X , End turn
Switch reset turn is ON

Page 3 : Span if Switch revert is ON
Switch revert is OFF
Revert process
Switch Transform is ON

Page 4 : Span If Character HP <= 70% max HP and Switch Transform is ON
Switch Transform is OFF
Transform process

Page 5 : Span is Switch reset turn is ON
Var 3 = Character Current HP
If Character is class 2 (when they transform they change class)
If Var 3 (current HP) > Var 2 (threshold set up to Max HP *0.7 in page 1 in turn 0)
Switch Revert is ON
Else
Switch reset turn is OFF
End if
Else
Switch reset turn is OFF
End if

So each turn at the end of the turn, switch reset turn is ON to go trigger the event to check if the character should revert or not
If the character reverts, the switch to trigger the transformation when the character's HP drops again below 70% turn back ON
If he doesn't revert the switch goes back off until it will be turned ON at the end of each turn.

Mwahahahaha

Original thread: https://forums.rpgmakerweb.com/threads/troop-event-when-actor-hp-70-max-hp.183097/