WoW:API UnitCreatureFamily: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Jump() is actually removed, replace example) |
||
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 - name of the creature family (e.g., "Crab" or "Wolf") | |||
:;unit : | |||
:;creatureFamily : | |||
- | |||
==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. |
Revision as of 20:00, 23 December 2006
← 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
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 message("It's a godless killing machine! Run for your lives!"); end
Result
Displays a message if the target is a type of bear.