KG Panels + Coloring
Posted from Below and from PM's
(Big thanks to Nib!) Normal Threat: -- OnLoad Code:
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE") Code:
-- Replace unit with "party1" to "party4" for party members. Or ("target", "targettarget") for seeing threat on your target. Personal Colors: (also with extra quirks that doesn't show threat unless you're in group/have pet and won't show in BGs) -- OnLoad Code:
self:RegisterEvent("PLAYER_ENTERING_WORLD") Code:
--- {R, G, B, A} - Set A to 0 to hide the panel. Same as above, but default ThreatColors: -- OnLoad Code:
self:RegisterEvent("PLAYER_ENTERING_WORLD") Code:
local color, status |
Quote:
Code:
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE") -- OnEvent Code:
-- Replace unit with "party1" to "party4" for party members. Or ("target", "targettarget") for seeing threat on your target. Hmm, may need a "UNIT_TARGET" event registered in OnLoad. |
The code works.. but the only problem is that I want the border to change colors, not the BG >< Any fix you may think up?
And thank you very much for the previous code~ |
Quote:
|
Come to think of it, are you wanting to see the threat of party members on your target, or just whether or not they have agro?
If it's the latter, just remove the second argument from the UnitThreatSituation line. So like this: Code:
local status = UnitThreatSituation(unit) |
3 Attachment(s)
Quote:
1st : Before combat and script change 2nd : In combat after script change 3rd : After combat with script |
Quote:
Try changing the color lines to: Code:
local color = status and {GetThreatStatusColor(status)} or {0,0,0} |
-- OnLoad
Code:
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE") Code:
-- Replace unit with "party1" to "party4" for party members. Or ("target", "targettarget") for seeing threat on your target. EDIT: Awesome! That worked great, Thank you very much for your time and patients :) <3 I also like how if I am in combat with more then 1 enemy, my Border doesn't go back to black until everything is dead. ^^ Though in group combat that might be a lil odd to see it go to white instead of to black again @@ oh wells, I like it how it is |
Hmm is there anyway I can make 1 KGPanel for say raid unit 1, and the border goes around every one of my raid members by chance? O.o
|
You could move to RDX.
You don't need to learn lua anymore. You use the development tool that will generate the code and execute it for you. http://www.wowrdx.com/tutorials-basi...-and-backdrops What you are looking for is exaclty the business of RDX. |
Quote:
|
I understand. You are afraid to lost all what you have done.
Please take 2 minutes to watch this video : http://www.youtube.com/watch?v=8WNdlNBw03I This is the user interface manager that let you save and load many UIs with RDX. Cheers Sigg |
All times are GMT -6. The time now is 09:28 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI