Several times when creating my game, I have come to a
situation where I want to ask "Which Person's
SCRIPT_ON_ACTIVATE_TALK script would be called if
the player pressed the action key now?" or "Which
Person's script would be called if the player pressed the
action key when his sprite was at (x,y,layer,direction)?"
If there is only 1 sprite in front of the sprite attached to
the input, this is a pretty trivial question to answer. But if
there are two, one slightly off to the side, for example,
which one would the action key trigger?
I would like to see a function to return the name of the
Person whose script would be triggered. I could script
this myself, if someone could tell me the algorithm used
to determine which Person is targetted.