Wowpedia

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

READ MORE

Wowpedia
No edit summary
({{wowapi}}, format)
Line 1: Line 1:
  +
{{wowapi}} __NOTOC__
<center>'''UnitCreatureFamily''' ''-Documentation by [[User:Boro|Boro]]-''</center>
 
 
 
Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"), or nil if the unit does not have a creature family (e.g. because it is not a creature).
 
Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"), or nil if the unit does not have a creature family (e.g. because it is not a creature).
 
creatureFamily = UnitCreatureFamily(unit);
   
  +
==Parameters==
local creatureFamily = UnitCreatureFamily(unit);
 
 
===Arguments===
  +
:;unit : [[UnitId]] - unit you wish to query.
 
===Returns===
 
:;creatureFamily : String - name of the creature family (e.g., "Crab" or "Wolf")
   
 
==Example==
----
 
 
if ( UnitCreatureFamily("target") == "Bear" ) then
;''Arguments''
 
 
Jump(); -- jump for joy because you found Pooh
 
 
end
:(String unit)
 
 
===Result===
 
:;unit : the unit name (e.g., "target", "mouseover")
 
 
----
 
;''Returns''
 
 
:creatureFamily
 
:;creatureFamily : a string representing the creature family (e.g., "Crab" or "Wolf")
 
 
----
 
;''Example''
 
if ( UnitCreatureFamily("target") == "Bear" ) then
 
Jump(); -- jump for joy because you found Pooh bear
 
end
 
 
;''Result''
 
 
If the target is a bear, then you jump.
 
If the target is a bear, then you jump.
 
----
 
;''Description''
 
 
: Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"), or nil if the unit does not have a creature family (e.g. because it is not a creature).
 
 
----
 
{{WoW API}}
 

Revision as of 19:15, 23 December 2006

Returns the creature family of the specified unit (e.g., "Crab" or "Wolf"), or nil if the unit does not have a creature family (e.g. because it is not a creature).

creatureFamily = UnitCreatureFamily(unit);

Parameters

Arguments

unit
UnitId - unit you wish to query.

Returns

creatureFamily
String - name of the creature family (e.g., "Crab" or "Wolf")

Example

if ( UnitCreatureFamily("target") == "Bear" ) then
 Jump(); -- jump for joy because you found Pooh
end

Result

If the target is a bear, then you jump.