#ScanEvents - AutoClone for each event sent

5 messages · Page 1 of 1 (latest)

thorn herald
#

I am trying clone a health bar weakaura for each nameplate with a raid mark attached to it. It scans the 10 closest targets and checks if they have a raid mark. If it finds one, it fires a WeakAuras.ScanEvents("MARK_TARGET", markID) .But, I cannot seem to get Mark - Health to replicate multiple times. It will only displays one health bar, and only the health of the first mark it finds.

wispy lily
#

What trigger are you using for it?

foggy knot
#

You're using code but have posted no code. How could anyone help?

thorn herald
#

Apologies, I was mainly wondreing if there was a known approach for something like that. My Mark - Scanner is using a custom trigger and executing this loop on every frame. And the Mark - Health is listening for the MARK_TARGET EVENT.

    for i = 1, 10 do
        local unitID = "nameplate" .. i
        if UnitExists(unitID) then
            local markID = GetRaidTargetIndex(unitID)
            if markID then         
                WeakAuras.ScanEvents("MARK_TARGET", markID)
            end
        end
    end
    return true
end
thorn herald