IsUnitAttackable
ESO Lua API function — used by 39 of the 3,030 addons we indexed (combined 1,019,732 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
IsUnitAttackable(string unitTag)Returns: bool attackable
Real usage — from Combat Reticle
--- Must get target info to determine normal/hostile/friendly mode
if IsUnitAttackable( "reticleover" ) then
if g_use_combat_hostile thenShort excerpt from the shipping addon Combat Reticle — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| Combat Reticle | 183,846 |
| LibBossFight | 136,378 |
| HowToSunspire | 122,568 |
| Perfect Weave | 106,805 |
| Slip's Sanity's Edge Assist | 81,446 |
| Combat Cloud Updated | 39,850 |