Thread: Help noob)
View Single Post
11/16/18, 06:51 PM   #4
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
To find the health a player has, use GetUnitPower(string unitTag, number CombatMechanicType powerType), which returns: number current, number max, number effectiveMax

Unit Tag is a string which identifies what you want to query. For example, to find the player's health, use 'player', use 'group1', 'group2' for group members, 'boss' for the boss, 'target' for what the reticle is looking at. Note that if using /script, target won't work since you're not 'looking' at anything while the chat entry is open.

CombatMechanicType is a constant, which can be found here: https://wiki.esoui.com/Globals#CombatMechanicType

You'd want to use POWERTYPE_HEALTH for the health.


[color=#e5e5e5]
Originally Posted by [/COLOR
whiterabbit01]
p.s. I hope this answers your query?

Given this is the 'General Authoring Discussion' forum, under the Developer Discussions category, I think it extremely likely that this does not answer his query at all, and there's a good chance he's an experienced player to boot.
  Reply With Quote