[SOLVED] Problem with status effects

Hello, thanks for taking the time to check out my issue.

I'm working on a "unique" battle mechanic for my project in RPGMAKER 2k3. It's something reminiscent to a "limit" bar from FF7, where it fills up and you can do certain attacks and obtain certain buffs for a certain small period of time.

I made the bar and did the code for it to fill up, and so far it works well. However, the bar is shown in the battle through the use of a status effect (with an empty bar being a "normal" state and a bar with 1 tick or charge being an actual status effect), and it creates issues with other status effects I have.

For example (and to serve as the most relevant one), the bar will fill up, then a status like Poison will be inflicted. Poison will stay on the character for a little bit, but once it disappears, the bar will be shown as being empty before the code continues, proceeding to show the actual bar that *should* be displayed.

Is there any way to fix this? (More specifically, is there any way to make a status effect revert to another after it is done?)

1608014455599.png


1608014479821.png


1608014500402.png


EDIT: added my code for reference.
From the rpg maker 2003 help
States
4.Rating


Specify the rating (priority) of the state in the range of 1 to 100.


When multiple states are inflicted, the one with the highest rating will be displayed.


If multiple states are inflicted at the same time, their ratings will be compared to the state with the highest rating, and states that have less than or equal to 10 rating points will be automatically cured.
Probably poison remove one of them or all of them, because it have a high priority.
From the rpg maker 2003 help

Probably poison remove one of them or all of them, because it have a high priority.
I didn't actually realize it was this simple and easy, I was losing my mind over it earlier. All it took was readjusting the bars and making sure they fell within the 10 range beneath the actual status effects.
Thank you!
@windy10: You may find this information useful the next time you are posting a thread like this: You can actually just paste event commands from RM into the forums (or any other place, for that matter):

O7mWi7WEjj.gif

Original thread: https://forums.rpgmakerweb.com/threads/solved-problem-with-status-effects.131012/