Image Won't Change With Conditional Branch

Hey, so I'm new to RPG Maker MV and not sure what I'm doing wrong here.

What I'm attempting to do is make it so, during the battle, art of the character is shown, but when they are hit with an attack that puts them to sleep, the image changes to another where they're asleep. I feel like this conditional branch should work, the "else" works and the character's normal art is shown, but when the enemy attacks and uses its sleeping attack, the image doesn't switch.
If I could get any info on what's wrong that would be nice. Thank you!
1726474722238.png
Welcome!

Make sure you pay attention to your span setting - and keep in mind that, aside from looking things up in MV's instructions, you can also hover your mouse over any options to get a pop-up description.

1726489695847.png


A span of Battle will only run once per battle. So at the very beginning of battle, it will see the actor has <= 100% HP, check whether they have Sleep, then never check again.

A better way to implement this would be with a plugin like Yanfly's Buffs and States, where you can make the state itself do the check and change the image at the very moment it's applied.
Welcome!

Make sure you pay attention to your span setting - and keep in mind that, aside from looking things up in MV's instructions, you can also hover your mouse over any options to get a pop-up description.

View attachment 317900

A span of Battle will only run once per battle. So at the very beginning of battle, it will see the actor has <= 100% HP, check whether they have Sleep, then never check again.

A better way to implement this would be with a plugin like Yanfly's Buffs and States, where you can make the state itself do the check and change the image at the very moment it's applied.
Thanks! Helped a ton, I'll have to try the Yanfly plugin because it sounds like that'd be a much better option.
Hey, I know this is a bit of a late reply, haven't had much time to really mess with this until today, but I'm a little confused with Yanfly's Buffs and States stuff.
Looking through the plug-in's description, I think I'd need to use the "Custom Respond Effect" but I'm not very good with the programing language used in MV and not sure what code I need to put into the state's notes to actually have the event run and the image appear/change.
Welcome!

Make sure you pay attention to your span setting - and keep in mind that, aside from looking things up in MV's instructions, you can also hover your mouse over any options to get a pop-up description.

View attachment 317900

A span of Battle will only run once per battle. So at the very beginning of battle, it will see the actor has <= 100% HP, check whether they have Sleep, then never check again.

A better way to implement this would be with a plugin like Yanfly's Buffs and States, where you can make the state itself do the check and change the image at the very moment it's applied.
Looking through the plug-in's description, I think I'd need to use the "Custom Respond Effect"
No, Custom Apply Effect runs when a battler gets a state. Custom Respond happens when they already have the state and they get hit.

not sure what code I need to put into the state's notes
There's a pinned thread of script calls, you just look up what the code version of Show Picture is.


So you'd have
Code:
<Custom Apply Effect>
$gameScreen.showPicture(1, "D1", 0, 0, 0, 100, 100, 255, 0);
</Custom Apply Effect>

Then a Custom Remove Effect that restores the original picture.

Original thread: https://forums.rpgmakerweb.com/threads/image-wont-change-with-conditional-branch.171938/