for i=1, 11
do
_G["PallyPowerC"..i]:SetBackdrop(nil)
end
for k=1, 11
do
for j=1, 25
do
_G["PallyPowerC"..k.."P"..j]:SetBackdrop(nil)
end
end
This script works to remove all of the default background panels, but I am having trouble to get it to trigger when I load in, any help on where to put this and any functions I need to get it to fire is appreciated.
2) The bigger problem is there are so many anchors and parents that need inputting, I would need around 260 panels to cover everything, which is a bit much :)
I was hoping some form of script could either change the size of a panel depending on how many of each class there are, or anchor and parent a panel to each one with a similar for loop used before.
The main problem with the first option is PallyPower doesn't label itself depending on classes. It numbers the frames depending on how many different classes there are in the raid although it is always in the same order.
Any help with these problems are much appreciated, I have been working for a while to try and get this to work.
Q: How would I have a panel show only when in combat with a pet?
Currently I have the panel showing when in combat and hidden ooc. However it also displays even without my pet active which I've realized I do not want. I have tried a few different ideas, each to no avail.
So I thought I would ask here for help.
Also note, my OnLoad is the same as one from a previous DK post because even tho I am a Hunter, I had the same problem he did with the frame being shown on login, but then working properly after the first combat.
---Start
OnLoad
if select(2, UnitClass("player")) == "HUNTER" then
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
end
self:Hide()
OnEvent
if event == "PLAYER_REGEN_ENABLED" then
self:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
self:Show()
end
Thanks for the help. Since I've been getting better at Kgpanels, I'm only loving it more and more. Thanks for the help.
After reading the numerous pages, and getting some example I adapted a script to simply hide Recount_MainWindow when I am not fighting, and showing when I start the fight.
Thats a beginning to learn scripting with KGpanels.
if (event == "PLAYER_REGEN_ENABLED") then
Recount_MainWindow:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
Recount_MainWindow:Show()
end
So far the window shows when I start fighting and hide when I stop.
But if I take a portal, or simply log in game, then Recount shows.
So if I could get a little help to finalise my script I would appreciate.
-----
Also I was curious to understand and sorry if my question is silly but I thought that with the patch our Regen stopped at rest and start at fight.
If so that would mean that PLAYER_REGEN_ENABLED is now the beginning of the fight no ?
Thank you
I can help witht his one. Hehe. I was having the same problem until I had read a DK post who was having this issue and copied the code he was told to replace and simply replaced "DEATHKNIGHT" with "HUNTER". I've asked as well, if this is the proper way to do it (post above this one). It works 100% so I'll paste it for you.
OnLoad
if select(2, UnitClass("player")) == "HUNTER" then
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
end
self:Hide()
Just replace "HUNTER" with your player's class. I'm sure there is a better way seeing as doing this we would have to duplicate the panels for every otehr class we want using the pannel(s) we are trying to hide ooc. At least for now, this works.
As for the REGEN question. I assume it's the same as always otherwise these panels would show ooc and hide ic. *shrug*
i have a question about kgpanels and pitbull
ive set the anchor to ''PitBullUnitFrame5'' and ''PitBullUnitFrame2'' ive done 3 panels so i get a border meaning a background border and a inner panel ive set the strata of all 3 layers on background and background on level 0 border on level 1 and inner panel on level 2 from z-indexing but the problem is that the inner panel doesnt set the strata good meaning i see the numbers of the pitbullframe but i cant see the healthbar plz help me
I have a question. Maybe someone could answer or point me in the right direction. I already tried searching.
I want to have a panel that contains recount, carbonites map, and maybe omen. I then want to be able to click a button sized panel to then toggle it to display my grid setup.
Is there a way for a script to set the color of a gradient?
I've gotten what script I have to work using the self.bg:setvertexcolor, but it makes the panel one color, even with gradient selected in the Color and Opacity Settings.
As of now, I'm working on something that'll change the panel colors based on which Presence you're currently in, but I'd like the panels to be gradients instead of solid if at all possible.
that is what i found out to, afther i recheck my profile they are normal but whenever i reload the ui they become the same again but how do i get the healthbar to show properly, i mean i can see the text why not the bars?
They should since i took 2 of them from a pack and the third i converted to tga from a .png, actually it was your SeerahSolidBorder.png from your addon TipTop since it gave me the colours so good when i used them as borders but when i stopped using your addon the borders also went away so i was trying to get them in to the SharedMedia addon instead and i can see them in the dropdown menu but in chat it says that kgpanel cant load them.
I tried that and it still fail to load it altho i can see it in the dropdown menu.
I even tried to reinstall LibSharedMedia 3.0 r59 and SharedMedia v3.0 and i also made a fresh install of kgPanels r332 and wiped my savedvariables but i just cant get it to load.
The path i use is SharedMedia:Register("border", "SeerahSolidBorder", [[Interface\\AddOns\\SharedMedia\\border\\SeerahSolidBorder.blp]])
Yes. There are two ways to do those file path strings. You can enclose them with double brackets (which is how you mark large/multi-line strings or strings with quotes) or if you use the regular quotes format for strings, then you need to escape the \ by adding a second one.
About 20 pages ago, someone asked for a script to hide panels and show panels depending on what stance you were in, but the script didn"t quite work. I think it was:
On Event:
local form = GetShapeshiftForm(true)
if ( form == 1 ) then
-- This is Battle Stance
self:Hide()
elseif ( form == 2 ) then
-- Defensive Stance
self:Show()
else
-- Beserker Stance
self:Hide()
end
I'd attempted to modify this to change the background color of panels for a DK's presences, but it never ended up working. I'm very new to Lua programming, but would replacing the (form==1) with form(1) work if you changed the top line to something like "local form = GetShapeshiftForm(num)" ? I've not had a chance to test this since the realms are still down.
Thank you for that. Hopefully that'll fix the Warrior Stance issue from way back on 72. What I was attempting to do for the DK presences' not working, however. What I did for my Presence script is :
On Load
self:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
On Event
local form = GetShapeshiftForm(true)
if (form==1) then
self.bg:SetVertexColor(1,0,0,self.bg:GetAlpha())
elseif (form==2) then
self.bg:SetVertexColor(0,1,0,self.bg:GetAlpha())
else
self.bg:SetVertexColor(0,0,1,self.bg:GetAlpha())
end
I used 1's and 0's for the colors just to see if I could get it working. All it does is change the panel to Blue when I change presences though.
Started having this problem to day after download the patch, ( I updated the Skinner add on...after so this may be cause by Skinner..im not sure...My background/ border texture is missing on my panels...and i get this in chat frame when i turn on kg panels...
"kg panels failed to find artwork Skinner Edit Box /Scroll bar Border type border"
"Failed to find artwork for border in Skinner or shared media"
I realize this is from skinner and i will ask there also...not sure how to fix this...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want to set a background for an addon known as PallyPower.
So far there are two problems I have found;
1) The default panels won't disappear, I have to run a script to get them to go away. The script that I have used so far is as follows
PallyPowerAura:SetBackdrop(nil)
PallyPowerRF:SetBackdrop(nil)
PallyPowerAuto:SetBackdrop(nil)
for i=1, 11
do
_G["PallyPowerC"..i]:SetBackdrop(nil)
end
for k=1, 11
do
for j=1, 25
do
_G["PallyPowerC"..k.."P"..j]:SetBackdrop(nil)
end
end
This script works to remove all of the default background panels, but I am having trouble to get it to trigger when I load in, any help on where to put this and any functions I need to get it to fire is appreciated.
2) The bigger problem is there are so many anchors and parents that need inputting, I would need around 260 panels to cover everything, which is a bit much :)
I was hoping some form of script could either change the size of a panel depending on how many of each class there are, or anchor and parent a panel to each one with a similar for loop used before.
The main problem with the first option is PallyPower doesn't label itself depending on classes. It numbers the frames depending on how many different classes there are in the raid although it is always in the same order.
Any help with these problems are much appreciated, I have been working for a while to try and get this to work.
Currently I have the panel showing when in combat and hidden ooc. However it also displays even without my pet active which I've realized I do not want. I have tried a few different ideas, each to no avail.
So I thought I would ask here for help.
Also note, my OnLoad is the same as one from a previous DK post because even tho I am a Hunter, I had the same problem he did with the frame being shown on login, but then working properly after the first combat.
---Start
OnLoad
if select(2, UnitClass("player")) == "HUNTER" then
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
end
self:Hide()
OnEvent
if event == "PLAYER_REGEN_ENABLED" then
self:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
self:Show()
end
Thanks for the help. Since I've been getting better at Kgpanels, I'm only loving it more and more. Thanks for the help.
- Arrowsong
I can help witht his one. Hehe. I was having the same problem until I had read a DK post who was having this issue and copied the code he was told to replace and simply replaced "DEATHKNIGHT" with "HUNTER". I've asked as well, if this is the proper way to do it (post above this one). It works 100% so I'll paste it for you.
OnLoad
if select(2, UnitClass("player")) == "HUNTER" then
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
end
self:Hide()
Just replace "HUNTER" with your player's class. I'm sure there is a better way seeing as doing this we would have to duplicate the panels for every otehr class we want using the pannel(s) we are trying to hide ooc. At least for now, this works.
As for the REGEN question. I assume it's the same as always otherwise these panels would show ooc and hide ic. *shrug*
ive set the anchor to ''PitBullUnitFrame5'' and ''PitBullUnitFrame2'' ive done 3 panels so i get a border meaning a background border and a inner panel ive set the strata of all 3 layers on background and background on level 0 border on level 1 and inner panel on level 2 from z-indexing but the problem is that the inner panel doesnt set the strata good meaning i see the numbers of the pitbullframe but i cant see the healthbar plz help me
i inserted a screenshot of what i ment
thnkz in advance
I want to have a panel that contains recount, carbonites map, and maybe omen. I then want to be able to click a button sized panel to then toggle it to display my grid setup.
I've gotten what script I have to work using the self.bg:setvertexcolor, but it makes the panel one color, even with gradient selected in the Color and Opacity Settings.
As of now, I'm working on something that'll change the panel colors based on which Presence you're currently in, but I'd like the panels to be gradients instead of solid if at all possible.
that is what i found out to, afther i recheck my profile they are normal but whenever i reload the ui they become the same again but how do i get the healthbar to show properly, i mean i can see the text why not the bars?
help
I put the tga file in my SharedMedia folder and registered it as such and i can see in the drop down menu in kgpanel but it failed to load.
I have restarted wow to see if that was needed a few times and the path is ok inclusive the spelling too.
I use the latest kgpanel vers. r332
-Strongbow-
http://forums.wowace.com/showthread.php?t=15439
I even tried to reinstall LibSharedMedia 3.0 r59 and SharedMedia v3.0 and i also made a fresh install of kgPanels r332 and wiped my savedvariables but i just cant get it to load.
The path i use is SharedMedia:Register("border", "SeerahSolidBorder", [[Interface\\AddOns\\SharedMedia\\border\\SeerahSolidBorder.blp]])
-Strongbow-
Happy again
-Strongbow-
[[Interface\AddOns\....]]
"Interface\\AddOns\\..."
On Load:
self:RegisterEvent( "UPDATE_SHAPESHIFT_FORMS" )[FONT=monospace]
[/FONT]self:Hide()
On Event:
local form = GetShapeshiftForm(true)
if ( form == 1 ) then
-- This is Battle Stance
self:Hide()
elseif ( form == 2 ) then
-- Defensive Stance
self:Show()
else
-- Beserker Stance
self:Hide()
end
I'd attempted to modify this to change the background color of panels for a DK's presences, but it never ended up working. I'm very new to Lua programming, but would replacing the (form==1) with form(1) work if you changed the top line to something like "local form = GetShapeshiftForm(num)" ? I've not had a chance to test this since the realms are still down.
On Load
self:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
On Event
local form = GetShapeshiftForm(true)
if (form==1) then
self.bg:SetVertexColor(1,0,0,self.bg:GetAlpha())
elseif (form==2) then
self.bg:SetVertexColor(0,1,0,self.bg:GetAlpha())
else
self.bg:SetVertexColor(0,0,1,self.bg:GetAlpha())
end
I used 1's and 0's for the colors just to see if I could get it working. All it does is change the panel to Blue when I change presences though.
http://wowprogramming.com/docs/api/GetShapeshiftForm
"kg panels failed to find artwork Skinner Edit Box /Scroll bar Border type border"
"Failed to find artwork for border in Skinner or shared media"
I realize this is from skinner and i will ask there also...not sure how to fix this...