Is there a way to check which actor is using a skill while outside of battle?

Topic question says everything. I have a skill usable only on a map and only has an effect under certain circumstances, which is handled through a common event. I want to be able to do two things:
- Use a message box to say who's using the skill (i.e. Harold cast Heal!)
- If the spell should fail, I want to refund the spent MP to whoever cast it.

In order to achieve both of those things, I need to be able to reference the skill user, such as storing their Actor ID into a variable. Is this possible? And let me know if I'm missing info you need.
I think this gives you the actor Id who used the skill in your menu:

$gameParty.menuActor().actorId();
if everything is in the common event, you can target the skill on the user and give that actor an invisible target state (no messages, no icon) and then in the common event check which actor has the state, that is the one who used the skill
if everything is in the common event, you can target the skill on the user and give that actor an invisible target state (no messages, no icon) and then in the common event check which actor has the state, that is the one who used the skill
That does work, though it has the caveat of forcing the player to choose the target, and the spell isn't meant to be targeted like that.

I think this gives you the actor Id who used the skill in your menu:

$gameParty.menuActor().actorId();
This works wonders. Thanks.
This thread is being closed due to being solved. If you need it reopened, report it to let us know why.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-check-which-actor-is-using-a-skill-while-outside-of-battle.161851/