Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API UnitCreatureFamily

From WoW Classic Wiki
UnitCreatureFamily -Documentation by Boro-

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).

local creatureFamily = UnitCreatureFamily(unit);

Arguments
(String unit)
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.


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).

Template:WoW API