Go to Page... |
Thread Tools | Display Modes |
01-23-17, 11:32 AM | #21 |
If the addon is disabled then there will be no entry in the addon list with your Enable/Disable buttona because the addon hasn't loaded because it is diabled. It would have to be enabled bia the Addons button on the game menu or at the character selection screen.
To Test (still has the message code to show that it won't get printed): Lua Code:
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
01-23-17, 11:34 AM | #22 | |
Well bassicly the code fizzlemizz helped out with makes it so if i click on the disable button it will disable the addon and print out "HelyaAssist is now disabled" I just want to add the same principle for the enable button aswell, so if i click on enable button it will enable the addon if it already was disabled and print out "HelyaAssist is now enabled" Hope this make sense <3 best regards! |
||
01-23-17, 11:34 AM | #23 |
That addon won't be able to enable itself but the game "AddOns" buttons will.
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
01-23-17, 11:36 AM | #24 |
01-23-17, 11:37 AM | #25 | |
Best regards! |
||
01-23-17, 11:37 AM | #26 |
It is and it's not possible. Neither will the message print after the ReloadUI bacause the addon is now disabled. Trying to caal the function with the message atraight after the ReloadUI won't work either because at this stage you screen has gone blank and the addon, along with all the others are being unloaded.
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
01-23-17, 11:38 AM | #27 |
i know, i guess he doesn't understand it (yet)
|
|
01-23-17, 11:57 AM | #28 | |
My question now was is there another way in the code to make the addon ignore all this code, if buttonDisabled is clicked Lua Code:
|
||
01-23-17, 11:58 AM | #29 |
If you don't want to try pas06s approach (which I haven't looked at but may well be better) then something like (dry coded so may not be exactly correct)
Edit:You will have to delete your HelyaAssistAddon.lua file from the SavedVariables folder while logged out or you will get errors. Edit2: if you're not seeing the message, change if not not HelyaAssistAddon.shown then too if not HelyaAssistAddon.shown then Lua Code:
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. Last edited by Fizzlemizz : 01-23-17 at 12:18 PM. |
|
01-23-17, 12:05 PM | #30 |
Fizzlemizz, feel free to look at my code in post 13, i don't have the biggest experience, but i feel like i did a good job with that code(after editing that post 5 times ).
|
|
01-23-17, 12:09 PM | #31 | |
This error pops if you click enable button for example Lua Code:
|
||
01-23-17, 12:13 PM | #32 |
Just updated the code and see the part about deleting your SavedVariables file.
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
01-23-17, 12:20 PM | #33 | |
if u mean that this should be removed from the .toc file i tried that but that gives more error becuase HelyaAssistAddon is used in the .lua code. Lua Code:
|
||
01-23-17, 12:23 PM | #34 |
The file HelyaAssistAddon.lua needs to be deleted from your WTF\Account\[userd id']\SavedVariables folder.
This is where the information is saved between sessions and the format has changed in the new version of the addon, make sure you're logged out before deleting otherwise the file will be re-written when you reload or exit the game. You only need to delete it once so the game can start with a fresh file. The code disables/enables the addon for all characters. If you want character by character then you will have to save the disabled/shown information for each character-realm or use ## SavedVariablesPerCharacter: instead of ## SavedVariables:.
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. Last edited by Fizzlemizz : 01-23-17 at 12:40 PM. |
|
01-23-17, 01:46 PM | #35 | |
Can you just help me tweak pas06's code? all buttons are working fine with the print , just as i wanted but if i click on disable and then go and fight helya and get the debuff , it will still run this code Lua Code:
DO you know how to do so if the disable button is registered it will not run that code if i get the debuff on me? This is the whole code just so you know which one i am talking about! Lua Code:
.toc file Lua Code:
|
||
01-23-17, 01:49 PM | #36 |
You would have to UnregisterEvent("ENCOUNTER_END") in the ENCOUNTER_END function otherwise the message would fire every time any encounter ends after it's registered, otherwise it looks like it should work.
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
01-23-17, 02:01 PM | #37 |
thats true, something is always missing
|
|
01-23-17, 02:06 PM | #38 |
Do you know how? ^^ , otherwise great code!
best regards guys Last edited by wille480 : 01-23-17 at 02:27 PM. |
|
01-23-17, 02:28 PM | #39 |
From the second block of code last posted.
Some things rearranged or removed for clarity. This enables/disables for ALL characters, would need some extra code for per character to work. Essentially, if the addon is faux disabled, the UNIT_AURA event is not registered. Lua Code:
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
01-23-17, 03:02 PM | #40 |
Hey fizzle!
Your recent post with that code do not work. It will create two panels in interface -> addons aswell with the same name "HelyaAssist" and will print "HelyaAssist is now Enabled" two times in a row. i only switched out second block and removed the second PLAYER_ENTERING_WORLD code from the above block. Well this is the code i have so far. I remade it abit so it wont create two panels , basicly everything is the same from before only that now this code wont work Lua Code:
The buttons and stuff work but not the purpose of the addon itself, it will now not print "MOVE TO MOON" or do a dispell countdown if you get the debuff , regarding what button you press, will not work with buttonEnable on or buttonDisable. This is the code i am talking about. Lua Code:
Last edited by wille480 : 01-23-17 at 03:06 PM. |
|
WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » button("OnClick") & PLAYER_ENTERING_WORLD |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|