I don't have much time, so try this.
Goal = Get your player to interact with the right item.
Easy way =
1. Add 1 invisible sprite. 1 pixel collision.
2. Pin that invisible sprite to player front with some spacing. Once player turns, that pinned sprite should remain in front. This will simplify your code. no need for directional offset.
3. If it is single player, add local var to player obj called interaction_target or something. When invisible sprite overlap something interactable, set its uid to player's interaction target. If you have many overlapping stuff, pick top.
4. When talk is called, send UID. Check again if that UID can be talked to. If true, display msg.
Complex way = Ain't anyone got time for that~ Let's make it simple