Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/17/14, 06:29 AM   #1
Uesp
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 15
GetUnitRace() for NPCs

I tried using the following to log information on NPCs inside a EVENT_RETICLE_TARGET_CHANGED function:
Code:
local level = GetUnitLevel(unitTag)
local gender = GetUnitGender(unitTag)
local difficulty = GetUnitDifficulty(unitTag)
local class = GetUnitClass(unitTag)           --Doesn't work
local race = GetUnitRace(unitTag)            --Doesn't work
The first 3 functions work fine but the Class/Race functions return an empty string. I assume they work fine on PCs but was wondering why not working on NPCs? I would expect NPCs to have a set race. As far as I can tell there are no other "get race" type functions in the API.

Any ideas or pointing out something I've missed would be great.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » GetUnitRace() for NPCs


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off