Display pictures on Status/Conditional branch in battle issues

I have been racking my head over this for a solid 2 days now. The idea is very simple: When a status affects an actor, display an image. When the status ends, remove the image. I've tried this in several different ways using conditional branches, common events and switches, and the end result always seems to be that the image never leaves.

I narrowed it down to the conditional branch. I've tested it in and out of battles. Out of battle works perfectly fine, but in battle, the "else" branch never seems to apply. I even made sure by adding display text for each condition, and only the "If Harold is affected" text displays. The "else" branch never seems to pull up during combat, even when the status is removed!

How can I resolve this issue with checking if status is resolved in conditional branches while in battle?
OR
Is there a simpler solution to display an image as long as a status is onscreen?
Please show screenshots of your out-of-battle event and your in-battle event. We can't help you if we can't see how you set it up. My guess is that you need to change the span.

Use Alt+PrintScreen to take the screenshots, and don't crop any further. This will give us everything we need to see without being so small because the background is included that it's hard to read.
Here is the screenshots of what I am currently working with. I haven't applied any plugins or scripts to the notes, and even if I were to, I haven't found a way to call a Common Event when an actor exits a state.

I have also tried to create a Common Event that is always running and checking for the Test Status, and when it is applied to show an image. When removed, it removes the image. This works only out of combat so far. In combat it seems to ignore the "else" tree as I mentioned earlier.

I even tried creating other common events and directly trying to Erase Picture, but none of them seemed to work in combat. When status is removed doesn't seem to be a condition or trigger for anything AFAIK.


I do not know what you mean by "change the span". I haven't found anything in MV related to a "span", and I tried digging while making these screenshots.

Common Events.png
Here is the common event I set up for a test status. I have also tried to apply this as an autorun on a switch, but it refused to run during battle. I gave it an extra success text if the image was removed by the common event.

Troop Battle Conditions.png
This is the conditions of the Troop I used to apply the test.

States.png
This is the Test Status state itself. It is supposed to, on application, prevent movement for 2-3 turns, and call an image through either a common event or the Troop's Condition's page

Skills.png
Screens.png
Parallel Process and Autorun common events don't run during battle.

(You know how I said to use Alt+PrintScreen for screenshots? See how tiny those troop tabs are and how hard they are to read? Alt+PrintScreen just captures the active window without the entire desktop background, making it much easier to read everything).

Take a look at your second image. You use the Test Status state as a condition for the tab, and then you use it again in a conditional branch. The reason the image isn't being removed is that the Else block is not running. Because you use it as the condition for the tab, if the status isn't applied, the condition to run the commands in that tab is not met, so the Else block is never being reached.

Change it to Turn 0 + 0, which (I think) will make it run continually during battle. You might want to add a Wait 5 Frames in there as well so there's no performance hit.
I set the Conditions to Turn 0+0, and tried span on Turn, Moment and Battle. I also tried each one with and without the Wait: 5 frames in the beginning. None of them seemed to enter the Else block. The text for removing the Test Status (from the state menu) shows, but the text in the else branch displays at the beginning of the battle. The Erase picture command never worked, and the else branch never seemed to appear after the status is afflicted or ends.
Did you remove the Test Status from the condition completely, or did you just add the Turn 0 + 0 to the existing condition?
Yes, I unchecked the Switch: Test Status too, and it did nothing. I am either caught in an endless loop of being unable to perform an action because of the else loop, or the else loop never shows up.

I want to status to be able to be applied more than once in a battle, so I want to set the span to either Turn or Moment. Moment gets me caught in a loop, and Turn doesn't seem to enter the Else branch.

Right now, I am starting a new project, and working through each step very carefully, Testing a battle each time I change anything small. I labeled everything based on where it is (skill, enemy, state, troop) and what could end the loop or get rid of the status and image (BattleEvent, CommonEvent etc) as well as taking notes on what combinations of methods I have tried. Things like Conditions, Span, Loops, If and If/Else, Erase Picture at certain points... it shouldn't be this difficult to display an image while a status is active.
I FOUND THE FIX!

I created a map to test the status in and out of battle, and a common event that would run parallel to a switch called "TestSwitchState". When active, TestSwitchState checks for any and all instances of the status: StateTest.

I placed four characters to act as events to turn the switch on, turn the switch off, inflict the status and remove the status. As expected, when the switch is active, I can add and remove the status and the image appears and disappears as intended.

I made sure the switch is ACTIVE and went into a battle to get the status applied. I got the status afflicted, and waited until it was removed. Upon removal, the image was still there. I found that Turn 0+0 only checks at the beginning of battle and nothing else. Moment will get the event caught in a loop of Else (blank) and you won't be able to move or select an option.

The conditions need to be set to Turn End, the span set to Turn, and the event page needs to call the Common Event.
The Common Event itself is a Parallel trigger only active on a switch. This switch can be auto activated at anytime, so that doesn't matter. The common event contents is a simple If/Else conditional that checks for status. If active, show picture, Else, erase picture.
To reiterate what I already said earlier ...

Common events set to parallel process or autorun will NOT run during battle. You have to call them via the Common Event command.

You just needed to change the span. You don't need the common event at all - if you have to put in a Common Event command, you could just replace it with the content of the common event. The beauty of a common event is that you can call it from every battle if you need to, then if you want to change something, you only have to change it in one place.

As you have it, I wouldn't make any further changes. The above is only to help you understand a little better how they work with battles.

If your issue is solved, just report your first post and let the mods know, and they'll lock the thread for you 🙂
I just doublechecked to see if I could run the entire CommonEvent branch under the Battle Event Conditions instead. It does work. That makes things much much smoother instead of calling a Common Event, a Switch and running a parallel process the entire time.

Also Shaz, running on the Condition Turn 0+0 doesn't run continually throughout the battle. From what I am seeing it only appeared to check it once, regardless of span. Either way, thanks for all the help!
Yeah, I wasn't sure about that. I usually have to experiment a bit with the turns and span together to get things to run at the correct frequency for what I'm after. Maybe take a look at the help file, because I think there's a bit of an explanation in there. Also, hovering over the box with the options will give a more detailed description of each one.
Thread closed IgnoreMe
At OP's request as issue is solved.

Original thread: https://forums.rpgmakerweb.com/threads/display-pictures-on-status-conditional-branch-in-battle-issues.113011/