WoW:API UnitCreatureFamily: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Move page script moved page API UnitCreatureFamily to API UnitCreatureFamily without leaving a redirect) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
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== | |||
===Arguments=== | |||
:;unit : [[UnitId]] - unit you wish to query. | |||
===Returns=== | |||
;creatureFamily : String - localized name of the creature family (e.g., "Crab" or "Wolf"). Possible English values are: | |||
{| style="margin-left: 3em; margin-top: 0;" cellspacing="0" cellpadding="0" | |||
| style="padding-right: 2em"|<poem>Bat | |||
:;unit : | Bear | ||
Bird of Prey | |||
Boar | |||
Carrion Bird | |||
Cat | |||
Chimaera | |||
Core Hound</poem> | |||
| style="padding-right: 2em"|<poem>Crab | |||
-- | Crocolisk | ||
; | Devilsaur | ||
Doomguard | |||
Dragonhawk | |||
Felguard | |||
Felhunter | |||
Ghoul</poem> | |||
| style="padding-right: 2em"|<poem>Gorilla | |||
Hyena | |||
- | Imp | ||
Moth | |||
Nether Ray | |||
: | Raptor | ||
Ravager | |||
Remote Control</poem> | |||
| style="padding-right: 2em"|<poem>Rhino | |||
Scorpid | |||
Serpent | |||
Silithid | |||
Spider | |||
Spirit Beast | |||
Sporebat | |||
Succubus</poem> | |||
| style="padding-right: 2em"|<poem>Tallstrider | |||
Turtle | |||
Voidwalker | |||
Warp Stalker | |||
Wasp | |||
Wind Serpent | |||
Wolf | |||
Worm</poem> | |||
|} | |||
==Example== | |||
if ( UnitCreatureFamily("target") == "Bear" ) then | |||
message("It's a godless killing machine! Run for your lives!"); | |||
end | |||
===Result=== | |||
Displays a message if the target is a type of bear. |
Latest revision as of 04:47, 15 August 2023
← WoW API < UnitCreatureFamily
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[edit]
Arguments[edit]
- unit
- UnitId - unit you wish to query.
Returns[edit]
- creatureFamily
- String - localized name of the creature family (e.g., "Crab" or "Wolf"). Possible English values are:
Bat |
Crab |
Gorilla |
Rhino |
Tallstrider |
Example[edit]
if ( UnitCreatureFamily("target") == "Bear" ) then message("It's a godless killing machine! Run for your lives!"); end
Result[edit]
Displays a message if the target is a type of bear.