Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
m (catfix, Replaced: {{framexml → <br>{{framexml)
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  +
<br>{{framexml}}
<center>'''InspectUnit''' - ''Documentation by VelvetPaw''</center>
 
   
 
Inspects the specified / selected "unit".
 
Inspects the specified / selected "unit".
Line 31: Line 31:
 
=== CheckInteractDistance("unit", distIndex) ===
 
=== CheckInteractDistance("unit", distIndex) ===
   
:[[API CheckInteractDistance|CheckInteractDistance]]("[[API TYPE UnitId|unit]]",distIndex) - Returns true if you are in range of the specified "unit" to perform the action specified by distIndex. Otherwise, returns false.
+
:[[API CheckInteractDistance|CheckInteractDistance]]("[[API TYPE UnitId|unit]]",distIndex) - Returns true if you are in range of the specified unit to perform the action specified by distIndex. Otherwise, returns false.
----
 
__NOTOC__
 
{{Template:WoW API}}
 
[[Category:API Inventory Functions|GetInventorySlotInfo]]
 

Revision as of 00:42, 15 July 2008


Inspects the specified / selected "unit".

InspectUnit("unit")

Parameters

Arguments

("unit")
unit
String - The UnitId to select as a target.

Returns

nil

Example

if (UnitPlayerControlled("target") and CheckInteractDistance("target", 1) and not
UnitIsUnit("player", "target")) then InspectUnit("target") end

Info

UnitPlayerControlled("unit")

UnitPlayerControlled("unit") - Returns true if the specified unit is controlled by a player, false otherwise.

UnitIsUnit("unit", "otherunit")

UnitIsUnit("unit", "otherUnit") - Returns true if the two specified units refer to the same unit (e.g., "player" and "target" can refer to the same unit), false otherwise.

CheckInteractDistance("unit", distIndex)

CheckInteractDistance("unit",distIndex) - Returns true if you are in range of the specified unit to perform the action specified by distIndex. Otherwise, returns false.