#Glow specific raid frame from aura_env
70 messages ยท Page 1 of 1 (latest)
Trigger State Updater is an advanced custom trigger type that allows for the creation of clones, as well as generally being a very flexible custom trigger for almost all situations. While it is complex, the wiki aims to be thorough so please do use it.
https://github.com/WeakAuras/WeakAuras2/wiki/Trigger-State-Updater-(TSU)/
make a field like unit = raid1 in your state
then any unit frame glow (from conditions or actions) will glow the frame belonging to that unit token
hm, where do I put that exactly? sorry I'm very new to writing custom code in auras
read the wiki article linked there
you can not just "put" it anywhere, your trigger would need to be a TSU
ah ok, I created a smart group aura with a custom trigger that collects the longest duration, but I'm guessing thats a bad way to go about doing it
not really, you reached your goal no?
it's just that to glow a specific unit frame, you'd then need something slightly different
so I create an additional TSU trigger? or do I have to drop my original?
!WA:2!1AvtVTTrt4O6dfGihsvrnst6bgv0aBuhHKaKe8wG4wrxP8rLTCOOItprVK7sXnHAxIDxklLJg9qp1d667nDU9I(jKFbeg9hqH)duaFON7SlzSTKTcYLsydTF8mZ8mZoZSBLwvhufxf)RRl4zQekJi60ZR9Z2PPyuNOijrvzgMkttqJ9iJu1(MWPHzsfFGEw6DJYyHkkNT26w2WxgJQSFSnktG8jSH1t4S(ePAxqAIWIWWIXVxPiwymxSlNYubB1ChVMUP2NZq(rCXaKYp1xrhqkNvj9ANz8EPyKI4sgsyQJrzWQifnCpkwf70aMkqgMjFORuHeQibM73pHFW(bf6yuL)Eb2NWdrj2ZX5L6m2235o2ncdjsPTkMydAuqW2PfEQwBaLTPG83Bd7Nqu7Kn4jqeoDBYGaIqU262yUb2zgUm4vtGO4A1Rtxy7ibAab2Fpc6nnaojRdQThitl9gRPLE9tfHgvIh4g70v1FaTFcefmKUaIMO6zZ5FBylid4dj26qMbchWiKZPlWkfK(Xle1UGv1FNrCToxZy8nSvImY6ZHLKijFKchHaSlindBT4y9VW)Z0I6xKw4iJ5hmXSGACk5OGmLIZ6mKiapycKQuKKeFIbIXCgGt6TZZ8A52y7MbrugvgV6XXumXhLKyYUKXoWYQBNF948Q1SSoujO97dbUF72IYH)ZuTT3cIye5(oAL6QZXU)XzsIjhXpKNXu7N(59pBwNuIab5yv30rhYDnBLF1GNsqjQyxgWpP1706rMsssOy5nCEWd)Fp6yzwGPePBwueD0m)TA01ZVRxdxVdniFgwADkODfeaKB3DB2U9SZz9Q3vtUTrQW4IfIpbM3Ceel7wOK9NIjbGj8a3r80MT3TvV2taGfUSLUhYRnvBdj5vtRwwgxSBBEFA4Op5V(qLJ)i4z69GcG7(bkwz0eZU)NubYm5C(N7pYOuAbV8OMItDkApfnPElkdRN4mEhD1zTEmibKY6B7iiivCTnmgBd7ALXQANLfF(Iy2LwdxqhOafb5AS(L2EbYChTtRhT26lw0oVKBEHy8Lw(EXdI5uZYWF6rJ2F)OQupngam9d0wzj9LxOv0PWtfWnnRvRmH87SRTXC4olgjiQmbZ0xY6cTJwQrFFI350GP5057)K(zitbqzA)2Cm53VsATLFR3ao2hI2K9pb4orWqjVeYCHG))FcIrhyohEy(1A9ocss6QeewFv8NMFlhg0B5iC5jLPVLqsc5mS8qnuDrA(Mo6tVw5pgeiFZ8Vp)hYBa)EZfxXjIZuPxRLG(w7xKHWGsr2EEtHEgUK(6ByVXQ536iyAak8n6MgmStchHF5eOhHpdASiIduOeO)YQUdYsuul3WeKuUA(ZTCGMqHfdOVLOhCO2EDHjF5rYyeMFWRkEYWkPF7YJu4XqLcn0xfliq31e84Pcd50UQJs)wLBEjshwoiFZlD70YbUABGt)6LB)ubjKQpzwzQomtnV8WQ0b(5ch4RUIBipHlE(kWN41qhqA0yN2nB5nvXdhwCYE9k)XSAuC6x8ImcHjdqmIDlKWU4w7aq5r0(wZmxibN4WzXkNu8ukZZa0UBq3TCB2CNdpGlW7jqPhUx5G7NrXZAfLW)jmTzt1UP3E5oucPpkCSpaMlIpcEEfyHoPfU1Sc3AlJZuPsLvMcxAqWMNE9lxDgLvOkaR1ejjjQ4rEoD886SDvzWdQFVhv)Evh(NV6F)d
Really appreciate your help, thanks so much
oh, that's not really a custom trigger ๐
haha I guess not
while whatever you're doing there certainly works, using the custom trigger function like that is not really the way if you wanna do more with it
Yea I can imagine, thats where the TSU comes in handy I suspect?
and you're iterating over all your auras there and doing multiple API calls to get info about the buffs
ah yea makes sense why its bad
when you have a trigger there that already contains all that info
you make a very good point
!watched
like that
this is looking at power word shield obviously, you'd put some other aura in trigger 2
Awesome, thanks so much for your help, can I add a 3rd trigger and use that for activation to only proc the WA during a specific boss mechanic?
I know how to do that trigger, just wondering if the TSU will work with a 3rd, unrelated trigger as 'required for activation'
sure that'd work
in that case this specific one would break in the sense that the text would always show as has the longest Buff!
even if no one has the buff
but you don't want the text anyways, eh? just the glow. and that'll work
yea only the glow, so I just remove the display text?
ye you can just delete it
cheers, can't tell you how much help you've been
anothing thing aswell if you don't mind hehe
for i, GUID in ipairs(aura_env.affected) do
local _, _, _, _, duration, expirationTime = WA_GetUnitDebuff(aura_env.GUIDToUnit[GUID], aura_env.targetSpellID)
allstates[GUID] = {
show = true,
changed = true,
unit = aura_env.GUIDToUnit[GUID],
progressType = "timed",
duration = 8,
expirationTime = 8 + GetTime(),
autoHide = true,
index = i
}
I want to fire off an event and send the raid position (raid1, raid2 etc) as an argument, can that be accessed with that code?
actually, I can probably send the name of the player and then iterate through the raid with UnitIsUnit?
I want to get the raid position of a player, either by name or id
trying to loop through the frames and compare names with UnitIsUnit now and CompactRaidFrame, but i can't get it to work
oh actually it is working, but I'm getting nil
frame = _G["CompactRaidFrame"..i]
this thing is returning nil
I want to get the raid position of a player, either by name or id
I don't understand this
it is working now
I can find the player that matched
the position of that player
1-20
not specifically, just trying to understand TSUs and events more ๐
-- do smth
end```
that iterates over all group members
where unit is the respective unit token, raid1 to raid20
(or party1 to party5 if in a party)
yea
then how would I best "export" that unit? if I want to make it glow for example
So, pass it along to some other code block or something?
Yea, say that it gives me 'raid3' for example, how do I make raid3 glow?
yea I guess thats the same thing, I dont quite understand it but ill give it some more thought, tyvm ๐
ok, I've gotten it to glow now, but I'm having trouble with hiding it... the timer properly happens but the glow does not hide
function(allstates, event, ...)
if event == "LAGET_ASSIGNMENT_FAR" then
local name = ...
local unit = nil
for unitID in WA_IterateGroupMembers() do
if name == UnitName(unitID) then
unit = unitID
print("unit: ", unit)
break
end
end
if unit then
allstates[unit] = {
show = true,
changed = true,
unit = unit
}
C_Timer.After(2, function()
allstates[unit].show = false
allstates[unit].changed = true
end)
end
return true
end
return false
end
Think I fixed it by making it a progressType = "timed" with a duration and autohide, hopefully thats a decent way to do it