WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Removing party frames help! (https://www.wowinterface.com/forums/showthread.php?t=33069)

Toomuchsugar 06-10-10 01:45 AM

Removing party frames help!
 
alright I'm vary new to Lua and add-on coding, Trying to create an add-on that removes my party frames on log in.

Code:

function MyAddon_OnLoad()

        HidePartyFrame:SetScript("OnEvent", nil);
        HidePartyFrame();
end

now either something wrong with it, or I'm missing a vital step in the add-on creating process, any help?

alimjocox 06-10-10 02:12 AM

Code:

        for i = 1, 4 do
                local frame = _G["PartyMemberFrame"..i]
                frame:UnregisterAllEvents()
                frame:Hide()
                frame.Show = function() end

                _G["PartyMemberFrame"..i.."HealthBar"]:UnregisterAllEvents()
                _G["PartyMemberFrame"..i.."ManaBar"]:UnregisterAllEvents()
        end

is the most common way to be rid of default blizzard frames..

tip: if u want to begin learning wowlua u should:
1) Learn from others.
2) wowprogramming.com
3) wowwiki.com

---
u said very new, so im just asking out of reactive thinking - but .toc files etc.. are all in order right?


All times are GMT -6. The time now is 12:55 AM.

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