Hi, I would like to have your help for a target counter, it counts my targets but I would like the trigger to be active from 2 targets and deactivated below, do you have an idea of how to do this? the aura I use is this one https://wago.io/Z16J84plN/1
#Counter
13 messages · Page 1 of 1 (latest)
Hello, I think you may find your answer in my "Range Check Tools" weakaura.
Also this is the custom function I use to check for X enemies within X range:
function()
if (not aura_env.last) or (aura_env.last<GetTime()-0.25) then
aura_env.last = GetTime()
WithinR = 0
for i = 1, 40 do
local unit = "nameplate"..i
if UnitCanAttack("player",unit) then
if WeakAuras.CheckRange(unit,5,"<=") then -- Range check distance!
WithinR = WithinR + 1
end
end
end
end
return WithinR >= 2 -- Minimum number of enemies!
end
Wago.io is a database of sharable World of Warcraft addon elements
Explanation: https://github.com/WeakAuras/WeakAuras2/wiki/Useful-Snippets#range-checking
Example Aura: https://wago.io/SimpleRangeChecker
Restricted in combat since 10.2 patch (November 16, 2023)
no globals!
I guess you use the global to have access to the target count in other auras?
Just send the target count as the payload of a fake event which you catch with a trigger in those auras. That way you can avoid globals
!scanevents
I wrote this a while ago that should do what you need: https://wago.io/dfJoCBqeT