WoW:API UnitCreatureFamily: Difference between revisions
Jump to navigation
Jump to search
UnitCreatureFamily -Documentation by Boro-
(Function returns nil if unit is not a creature) |
mNo edit summary |
||
| Line 34: | Line 34: | ||
---- | ---- | ||
{{Template:WoW API}} | {{Template:WoW API}} | ||
[[Category:API Functions|UnitCreatureFamily]] | |||
[[Category:API Unit Functions|UnitCreatureFamily]] | |||
Revision as of 13:19, 27 August 2005
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).