01/10/23, 03:03 AM
|
#3
|
Join Date: Dec 2022
Posts: 2
|
Originally Posted by Baertram
If it shows upon loading into the game you have forgotten to set your fighting text control invisible at the start (OnAddOnLoaded)
AvatarIndicator:SetHidden(true)
You currently do this only in your InCombat callback function which is not fired until you first get into combat.
AvatarIndicator:SetHidden(not inCombat)
e.g.
Lua Code:
function Avatar.Initialize() AvatarIndicator:SetHidden(true) --add this Avatar.inCombat = IsUnitInCombat("player") EVENT_MANAGER:RegisterForEvent(Avatar.name, EVENT_PLAYER_COMBAT_STATE, Avatar.OnPlayerCombatState) Avatar.savedVariables = ZO_SavedVars:NewAccountWide("AvatarSavedVariables", 1, nil, {}) end
|
Thank you
|
|
|