Who called the event?

Is there a way to detect which actor called a common event and store that in
a variable?

For example, if I have an item that calls a common event, is there a way to detect who's using the item?

I know I can use

$gameVariables.setValue(variableId, value);

is there a method or function I can use for "value" that will return the ID of the actor using the event?

Thanks much!
Is this in battle or on the menu scene opened on the map?
Is this in battle or on the menu scene opened on the map?
This would be on the menu scene opened on the map.
$gameParty._targetActorId
It works perfect! Thank you! I knew there was a way!!
MZ also has Control Variables -> Game Data -> Last -> Last Target Actor ID.
MZ also has Control Variables -> Game Data -> Last -> Last Target Actor ID.
Oh wow, there is a lot of neat stuff in "Game Data"! I've never gone in there before! Thank you!
and as a general way to handle this pre-MZ (where the last xy settings not yet existed) you can make the item grant an invisible target state (no messages, no icon) and then check in the common event which actor has that specific target state. That would be the actor the item was used on.

just remember to remove that state on that specific actor after the common event finished - or multiple item uses will go wrong

Original thread: https://forums.rpgmakerweb.com/threads/who-called-the-event.164886/