#Weakaura that triggers when X ranged are dead
9 messages · Page 1 of 1 (latest)
you can use the unit characteristics trigger
select all ranged specs
then make a TSU trigger that use this as a source
event TRIGGER:2
function
function(states, event, triggerNum, triggerData)
if event == "TRIGGER" and triggerNum == 2 then
local count = 0
for _ in pairs(triggerData) do
count = count + 1
end
if count == 0 then
states:Remove("")
else
states:Update("", {count = count})
end
end
end
how is count accessed for the purposes of conditions in the condition tab?
I've seen some weakauras that add their own variables to the trigger, so conditions can access them
in custom variable field { count = "number" }