I'm working on an autoreply addon but for this I need to get the whisper name and I can't find anything in the wow API.
Maybe it's with getArgs but I'm unable to use it.
You're code will only execute once and will die because of syntax. For testing equality, you need to use a double-equal (==).
Once you fix that error, you will get another error because you have an "end" where no "end" belongs. You actually have three "end" statements where they don't belong.
This is far from fixed for use, but I fixed the syntax errors for you:
if UnitExists("target") == exists then
UIParent:SetAlpha(1)
else
UIParent:SetAlpha(0.5)
-- a,d -- not sure what this is here for. ???
ChatFrame1:SetAlpha(1)
end
local frame = GetMouseFocus()
frame:SetAlpha(0.9)
Just to hammer the point home, if you don't register any events, put in an OnUpdate somewhere, or hook any functions, your code will only run once. Unless, of course, you execute if manually.
P.S. Setting the alpha of UIParent supersedes all other frame's alphas (except WorldFrame). In other words, 0.5 will be as opaque as the ChatFrame1 will ever get if UIParent's alpha is set to 0.5.
Quote from Starinnia »
Technically, the first line should probably be something more like:
if UnitExists("target") then
'exists' is never defined anywhere, and that function returns true or false already, so you really don't need any further comparison.
Thanks for the whole help I think I wouldn't make it usable without you
But If we change the ChatFrame1's parent to WorldFrame
ChatFrame1:SetParent("WorldFrame")
The ChatFrame will be parented with the WorldFrame and we can remove ChatFrame1:SetAlpha(1)
So the code will look like this
if UnitExists("target") then
UIParent:SetAlpha(1)
else
UIParent:SetAlpha(0.5)
ChatFrame1:SetParent("WorldFrame")
end
local frame = GetMouseFocus()
frame:SetAlpha(0.9)
First as my topic name is I must say that's my very first addon, before the only thing I did was modify oChat, oUF_kosken and oCD
My addon goal is to change the general alpha depending of the target
The code I did is that one
if UnitExists("target") = exists
then UIParent:SetAlpha(1)end;
else UIParent:SetAlpha(0.5) a,d ChatFrame1:SetAlpha(1) end;
end
local frame = GetMouseFocus()
frame:SetAlpha(0.9)
end
But now and for one week I can't use Wow so I can't test it, so can someone tell me if the code may be the good or if there are many errors
Try to center the bottom panel art... currently it's too far up and to the right, leaving uneven spacing between its edges and the buttons inside it. Likewise, move the trinket buttons down to line up with your action bars, and put the same border on them that you're using on your action bars (and every other button).
I'll try to center the panel and resize it.
For the trinket I can change the borders but Button Facade don' affect Item Rack and their style is from Timsans UI so I'll try to make Button Facade affect Item Rack. And yeah I already make them line up but I haven't taken any screenshot since so we can't see
Because you didn't read my post. I didn't tell you to add that line. I told you to change a specific line, and showed you what that line looked like for me after I changed it.
Change "fill = true" to "fill = false" in the settings table. Honestly if you can't figure things like this out, oCD may not be for you.
I add oCD master and not oCD 2.4 so I didn't add that line thats why I added the line.
I know that I'm not really good in lua but I try to discover and I started with the lua since 1 week.
For the "fill=false"it's in the statusbar options so nothing happenned my CD icons go down when there are several CD (I don't know if I asked correctly the first time)
I'm guessing that you mean "move", not "replace"... and you have to change the first line in the PLAYER_LOGIN function in ocd.lua. Mine looks like this:
I have absolutely no idea how oCD is scaling these values or anchoring the icons, as I haven't looked through the code, but the actual visible distances are nearly double what I had to use in the code. Experimentation is key.
Well... thanks for the help but I add the code line where you told me but nothing happenned
My code looks like that (the values are to test I'll move them later)
function addon:PLAYER_LOGIN()
self.group = self.display:RegisterGroup("oCD", "TOPLEFT", "UIParent", "CENTER", -2, -2)
register = self.bars.register
self:parseSpellBook(BOOKTYPE_SPELL)
self.bars.setMinMax(defaults.min, defaults.max)
self.bars.setTextPosition(defaults.textPos)
end
If you can upload (on pastey or as attached file) your ocd.lua and your bars.lua I'll try to modify the lua to put them where I want
Stanzilla helped me and that's good but what do I have to do to get the Cd go up and not down
I'm not entirely satisfied... probably, either unit frames will get pushed down further, or the action bars will get moved over to the center again. oCD will probably get moved too.
How did you do to replace the ocd buttons I tried but as I don't know very much in lua I didn't had any results
0
0
Maybe it's with getArgs but I'm unable to use it.
Thanks in advance for the ones who will help me
0
Thanks for the whole help I think I wouldn't make it usable without you
But If we change the ChatFrame1's parent to WorldFrame
The ChatFrame will be parented with the WorldFrame and we can remove ChatFrame1:SetAlpha(1)
So the code will look like this
0
My addon goal is to change the general alpha depending of the target
The code I did is that one
But now and for one week I can't use Wow so I can't test it, so can someone tell me if the code may be the good or if there are many errors
Thanks
0
How did you do to have an outline in your chat?
0
Download: http://ixo.no/git/oCD.git/snapshot/oCD-2.4.zip?h=2.4
Edit: I redo my UI that looks like this now
http://img166.imageshack.us/img166/6117/latestuiv2ar0.jpg
I have to finish the oCD config, the oUF party et the buffs
0
I'll try to center the panel and resize it.
For the trinket I can change the borders but Button Facade don' affect Item Rack and their style is from Timsans UI so I'll try to make Button Facade affect Item Rack. And yeah I already make them line up but I haven't taken any screenshot since so we can't see
0
http://img238.imageshack.us/img238/3858/latestuihr7.jpg
Any suggestions/comments to improve my UI are welcome
0
I add oCD master and not oCD 2.4 so I didn't add that line thats why I added the line.
I know that I'm not really good in lua but I try to discover and I started with the lua since 1 week.
For the "fill=false"it's in the statusbar options so nothing happenned my CD icons go down when there are several CD (I don't know if I asked correctly the first time)
PS: sorry for the poor english but I'm french
0
Well... thanks for the help but I add the code line where you told me but nothing happenned
My code looks like that (the values are to test I'll move them later)
If you can upload (on pastey or as attached file) your ocd.lua and your bars.lua I'll try to modify the lua to put them where I want
Stanzilla helped me and that's good but what do I have to do to get the Cd go up and not down
0
How did you do to replace the ocd buttons I tried but as I don't know very much in lua I didn't had any results