View Single Post
07/27/14, 02:14 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Aetheron View Post
Hi All,
I've recently released my first ESO add-on, "Combat Reticle" which detects various game states and changes the reticle. One issue I'm having though is that I can't figure out how to detect when it's possible to interact with another player (i.e. the "Press V to interact" is shown). GetUnitReaction() just tells me I'm targeting a player, and GetGameCameraInteractableInfo() and GetGameCameraInteractableActionInfo() don't seem to do anything with players (only NPCs and objects). GetInteractionType() doesn't seem to give me any result ever... Any ideas on how to detect this? I thought about just tracking the visibility of the interaction text, but that might fail since it could have been hidden by another add-on.

Thanks!
-A
You can use for example:
Lua Code:
  1. if PLAYER_TO_PLAYER:IsReticleTargetInteractable() then
  2.    --do stuff
  3. end

Or:
Lua Code:
  1. if DoesUnitExist("reticleoverplayer") and IsUnitOnline("reticleoverplayer") and GetUnitAlliance("player") == GetUnitAlliance("reticleoverplayer") then
  2.    --do stuff
  3. end
  Reply With Quote