Auto Passive States (YEP) Triggers delayed (Lag)

Good day fellow makers! I have been playing around with auto passive states to have different things (showing MP Gauge, learning a spell) happen automatically upon meeting certain conditions.
But something strange I can't explain happened!

State triggers normally when:
<Passive Condition: HP Above 70%>

But when:
<Custom Passive Condition>

if ($gameParty.numItems($dataItems[17]) > 0) {

condition = true;

} else {

condition = false;

}

</Custom Passive Condition>


Or:
<Passive Condition: Switch 31 OFF>





It triggers only after conditions are met AND I take about 10 steps!
I have rummaged through settings but can't seem to find an explanation to this. Could anyone shed some light?


Needless to say this is driving me mad, so TIA all 🙂 👍👍

Original thread: https://forums.rpgmakerweb.com/threads/auto-passive-states-yep-triggers-delayed-lag.114331/