View Single Post
01/28/17, 02:44 AM   #5
Anceane
 
Anceane's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 306
Just wanted to say again thank you, but .... after some hours trying to understand how to create something with that or to add it to something existant, ..... i must admit i am the worst for LUA. I can work my way to modify transparency, font, and that kind of stuff but i am no way able to go further.

So just wanted to say i hope you did not expect to see something created by me, i tried but no way. So i will just continue the old way, open the options gameplay and check/uncheck the helmet lol.

Thank you though for trying to hep me.
And no i am not asking you to do something. Nor anyone else. I can really deal with the basic toggle.

Originally Posted by votan View Post
I think Anceane is talking about showing helmet as soon as a hat collectible is activated and hide the helmet again as soon as no such collectible is active to show the hair.

All you need:
Lua Code:
  1. local function CheckHelmet()
  2.     SetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_HIDE_HELM, GetActiveCollectibleByType(COLLECTIBLE_CATEGORY_TYPE_HAT) == 0 and "1" or "0")
  3. end
  4.  
  5. EVENT_MANAGER:RegisterForEvent("NO_HELMET", EVENT_COLLECTIBLE_UPDATED, CheckHelmet)
  6. CheckHelmet()
  Reply With Quote