#Counter

13 messages · Page 1 of 1 (latest)

crude bough
#

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

Show how many enemies in 8 yard

viral shuttle
#

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
past rock
#

bad example code.

#

!range

rain canyonBOT
past rock
#

no globals!

regal falcon
#

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

fickle quest