Need Help With Common Event Conditional Branch

Hi y'all. I want my skill to call a common event, and execute differently based on whether or not the user is targeting themselves or another party member (different animation and action). I cannot figure out how to get the conditional branch to accomplish that. I've tried If: Script: target === "Shawn" and I've tried setting a variable to last target actor ID. Script: Target doesn't work at all, and last target actor ID doesn't seem to be working either (it just keeps using the else branch).

I've dug and dug through google and script call guides and can't seem to find what works. Can anyone help?

(Note: the action sequences in the screenshot are just placeholders to test the if/else, I've tested the actual individual sequences themselves and they work fine.)

EDIT: I solved it! Modified the skill to add a hidden state and check if the caster was state affected for if/else. Works like a charm now.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-common-event-conditional-branch.138151/