ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Health bar glow! (https://www.esoui.com/forums/showthread.php?t=9060)

oriaxaurusrex 03/31/20 04:54 PM

Health bar glow!
 
I am very new at trying to fiddle with scripts. Is there anyone who can point me in the right direction in order to disable the glow around the health bar when you have some sort of buff or debuff?

After exhaustive research I think its due to these:

ZO_UnitVisualizer_ArmorDamage:PlayPowerIncreaseAnimation(bar, info, instant)

ZO_UnitVisualizer_ArmorDamage:PlayPowerDecreaseAnimation(bar, info, instant)

How do I disable these in the lua?! Please help! I have no idea what sort of command to use. I looked at how people disable attribute bars but something tells me this isn't the same.

Scootworks 03/31/20 05:30 PM

without real testings, i guess you could simply do:

Lua Code:
  1. /script EVENT_MANAGER:UnregisterForEvent("ZO_UnitAttributeVisualizerplayer", EVENT_UNIT_ATTRIBUTE_VISUAL_ADDED)

oriaxaurusrex 03/31/20 07:39 PM

That worked!
 
Thank you! That certainly works however I also lose the shielding animation. While I think I am willing to lose that functionality, I would still be interested in an approach that can target just the health glow animation (if that is even possible).

Baertram 04/01/20 06:41 AM

At this line the attribute bars are build:
https://github.com/esoui/esoui/blob/...ebars.lua#L452

The class ZO_UnitAttributeVisualizerplayer (defined here: ) will later take the control with the variable "healthControl" to apply the glow etc.

The global variable for the attribute bars is PLAYER_ATTRIBUTE_BARS, defined here
https://github.com/esoui/esoui/blob/...ebars.lua#L714

So you can get the healthControl of the global var like this:
Lua Code:
  1. local healthControl = GetControl(PLAYER_ATTRIBUTE_BARS, "Health")

Maybe you can then check the child controls of the healthControl (e.g. via the addons zgoo or merTorchbug to get a list of functions, attributes and childs) and there exists one with the name Glow somewhere, which you can try to assign to a variable and use glowControl:SetHidden(true)

oriaxaurusrex 04/01/20 04:52 PM

Wow!
 
Sweet, that is not something I considered (as you can tell, I barely understand what I'm doing). I will take a look and see if I can isolate it.


All times are GMT -6. The time now is 02:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI