Need help creating addon for this script

Hey guys,

I’m trying to create an Addon to remove the raid frame playername text, I have the following script which I run on login but it obviously only works for party 1, 2, and 3,

Does anyone know how I can put these scripts into an addon on launch instead? And also preferably make it so it will work for 10 man groups as well?

/run CompactRaidFrame1Name:SetAlpha(0)
/run CompactRaidFrame2Name:SetAlpha(0)
/run CompactRaidFrame3Name:SetAlpha(0)

Thanks

local MyAddon = CreateFrame("Frame")

function OnWorldEnter()
 CompactRaidFrame1Name:SetAlpha(0)
 -- rest of the stuff comes here
end

MyAddon:RegisterEvent("PLAYER_ENTERING_WORLD")
MyAddon:SetScript("OnEvent", OnWorldEnter)

Throw that in MyAddon/MyAddon.lua, and follow it up with MyAddon/MyAddon.toc:

## Interface: 90200
MyAddon.lua

No idea how to make it work for 10-man groups, I don’t use the default frames, so can’t easily test.

Just remove the /run and paste it into https://addon.bool.no/

CompactRaidFrame1Name:SetAlpha(0)
CompactRaidFrame2Name:SetAlpha(0)
CompactRaidFrame3Name:SetAlpha(0)

The TOC version is 90002 btw, not 90200

Edit: Apparently CompactRaidFrame2Name and the like don’t exist yet on login

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.