Still is when the NPC doesn't do any action.
Fire is when the NPC decides to fire at you.
Let's try this with the basics first; events.

See? It seems to work fine.
However, when you defeat one of the states....

...that happens. One state will still activate even when you defeat the other.
So okay, I'm kind of an expert on these events. I know how to fix this, right?....

....wrong. Sort of. The NPC doesn't completely keep activating, but it still does show up for a split second before disappearing.

This isn't just a cosmetic thing either, it actually harms the player.
I want to know how I can have this effect without anything going wrong. And yes, I am aware of the fact that this probably cannot be done in the raw SMBX engine, rather, is it possible to make this perfect with Lua? I've tried it before but it never worked, so I just gave up on it (I deleted the original code for this because it didn't ever work, or seem to work). But now I am interested again, so I really want this question answered.