NPC is not vanishing when he is supposed to

I'm just having a weird problem with one of my events. I have the event set to run parallel, as there are a bunch of different things going on in the scene.

My character is laying on the ground severely injured, and is rescued by a warrior woman, from a nearby town, and her guard. She runs over to my injured main character, and her guard follows close behind her.

After engaging in dialogue with my injured character, she tells her guard to go back to the town, and tell them to get the medic, and have him at the ready, when she arrives with my main character. At first the guard refuses, as it is his job to protect her, until the woman orders him, and tells him she can handle herself against the weak monsters around the area, since she trained with the knights of her home town as she was growing up.

So the guard leaves to relay the message, and the conversation with my Main Character continues.

The problem is the guard is not disappearing when he is supposed to. I have a self switch set up, as he starts to walk off the screen, that activates the next page, which is basically a blank page with now character sprite. I also have it set up that after
he moves to the edge of the screen, he is supposed to go transparent.

However neither of these things happen, he just stands at the edge of the screen, not disappearing and not moving.

The rest of the scene works fine, before, and after the guard leaves. He just won't disappear, so when you Main Character gets up and the woman joins the party, the guard is still standing by the exit to the area, which makes the next part make no sense, because if he never left the area, how did he warn the Medic to be ready when the girl arrives with my MC.

Even if I exit the area, and go back in, the guard is still standing there. You can't interact with him, and his events don't trigger anymore. He just stands there, and never disappears.

Thanks for any help.
Hard to know exactly without looking at the event, but it sounds like the soldier's getting stuck on his move route. Is the edge of the screen the actual edge of the map? If so, he may be trying to walk beyond the edge where he can't move on.
Try to make sure he's taking the exact amount of steps to get to the last tile before the edge, or set his move rote so it's ommited if he can't move (it's the second checkbox to the lower left of the Set Move Route window).
If this is part of a scene the player needs to watch, you should use autorun rather than parallel process, so the player can't take over control half way through.

The page with the self switch as a condition should have a higher page number. But it does sound like the event is just getting stuck because something is in its way. An event will not move onto a tile occupied by another event, even if they have different priorities, even if the other event has no sprite, unless one of them has THROUGH on.
Hard to know exactly without looking at the event, but it sounds like the soldier's getting stuck on his move route. Is the edge of the screen the actual edge of the map? If so, he may be trying to walk beyond the edge where he can't move on.
Try to make sure he's taking the exact amount of steps to get to the last tile before the edge, or set his move rote so it's ommited if he can't move (it's the second checkbox to the lower left of the Set Move Route window).
Have to agree with dawnstar. Sounds like your self switch is set up fine but the event can't process that because it is still reading "Move right" and there is something blocking him from moving. If that page is also parallel, well, there's your problem. He's stuck in a loop basically, is what my theory is.
Thanks for the info. I will check that out. It is possible I set the move path up incorrectly.

Original thread: https://forums.rpgmakerweb.com/threads/npc-is-not-vanishing-when-he-is-supposed-to.133293/