View Single Post
07/23/18, 06:12 PM   #15
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
Originally Posted by HailTheMoons View Post
So if I do :
Lua Code:
  1. ZO_PreHook("ArePlayerWeaponsSheathed", myAddon.ToggleWeaponsSheathed())
it will trigger when ArePlayerWeaponsSheathed changes (and work even out of combat), and execute my function who write in the chat (myAddon.ToogleWeaponsSheathed) ?

I changed my code, but it's still not working as intended.

Do you know some add-on which use this ? I searched in my add-ons but found none with this function (even the "SheathWeapon" add-on use RegisterForUpdate() ! )

Thanks a lot for all the help you give me,
ArePlayerWeaponsSheathed is an info function. It doesn't change the sheath weapon state, it just tells you if they are sheathed or not. You want to do:


ZO_PreHook("TogglePlayerWield", myAddon.ToggleWeaponsSheathed())
  Reply With Quote