WoW:API UnitIsTapped: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API UnitIsTapped to API UnitIsTapped without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Returns true after the mob is hit by a player, does not return true if the mob is aggroed but not attacked yet.
{{wowapi}}
Checks to see if a unit is tapped.
local isTapped = UnitIsTapped(unit);
 
----
;''Arguments''
 
:;unit ([[API_TYPE_UnitId|UnitID]]) : the unit name (e.g., "target")
 
----
;''Returns''
 
:;isTapped: true if the unit is tapped, false otherwise.
 
----
;''Example''
 
if (UnitIsTapped("target")) then
  -- Target is tapped
end
 
;''Example used in conjunction with UnitIsTappedByPlayer''
if (UnitIsTapped("target")) and (not UnitIsTappedByPlayer("target")) then
  -- Target is tapped by another player
end

Latest revision as of 04:47, 15 August 2023

WoW API < UnitIsTapped

Checks to see if a unit is tapped.

local isTapped = UnitIsTapped(unit);

Arguments
unit (UnitID)
the unit name (e.g., "target")

Returns
isTapped
true if the unit is tapped, false otherwise.

Example
if (UnitIsTapped("target")) then
 -- Target is tapped
end
Example used in conjunction with UnitIsTappedByPlayer
if (UnitIsTapped("target")) and (not UnitIsTappedByPlayer("target")) then
 -- Target is tapped by another player
end