IsInGroup not working
Can someone give me an advice how can i run this code only if player are in group?
Quote:
CODE end But it doesen't take a effect, until i reload my ui. |
IsInGroup works and the only reason why it's only working for you on a reload is you need to register the event PLAYER_ENTERING_WORLD / GROUP_ROSTER_UPDATE and once either of those are fired then you check to see if you're in a group.
Code:
local smallcircle5 = CreateFrame("Frame", "SmallCircleTopCenter") |
nice, it works now,
Quote:
|
Why are you doing your own thing when you were given code that already should do everything right?
You're setting the texture for when you are in a group, but not doing anything to remove it once you're not in a group anymore. So it stays. Also, I recommend you look up some general guidelines on code quality and readability, and at the least, use [highlight="lua"] tags with proper indentation when adding code snippets to posts. http://lua-users.org/wiki/LuaStyleGuide |
ì worked before in weakauras, there was no need for untrigger, but i have no clue how to do it native :D
|
i did it, now work fine
Quote:
|
texture:Show and Hide will not work in combat. Change your coding to this...
Code:
local smallcircle5 = CreateFrame("Frame", "SmallCircleTopCenter") |
Tim, are you sure? I just tested, it works in combat also.
As far i know, only secure frames doesen't work in combat. |
Yeah you're right. I'm out of it.. I had to alter my post 3 times bc I put things in the wrong spots and forgot code. I should go to bed, lol.
|
wait, please tell me how can i create an another texture over my circle and anchor it? It need the default leader icon
|
If you're trying to add role, etc. icons onto your unit frames you can just use the built-in ones for oUF.
https://github.com/oUF-wow/oUF/blob/...rindicator.lua Code:
-- Position and size Go up 1 tree to: https://github.com/oUF-wow/oUF/tree/master/elements and there's the other built-in elements for oUF. |
IsInGroup does not accept units. It is only to check if you are in a group. The only argument it has is to check realm groups or instance groups.
https://wow.gamepedia.com/API_IsInGroup If it doesn't matter what kind of group you are in, just IsInGroup() is fine. |
Quote:
|
So? You can anchor it to your circle frame just by changing the self in the setpoint to the name of your circle frame.
|
Quote:
Anyone know how do i change the strata level of the elements in ouf? And if there any way for smoothing text positioning? |
All times are GMT -6. The time now is 08:06 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI