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.
#ScanEvents - AutoClone for each event sent
5 messages · Page 1 of 1 (latest)
What trigger are you using for it?
You're using code but have posted no code. How could anyone help?
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
I found this article, and it seems that the piece I was missing was using the allstates table in my TSU event. And the example weakaura is basically what I was trying to create anyways. Thank you everyone!
https://github.com/WeakAuras/WeakAuras2/wiki/Trigger-State-Updater-(TSU)/#the-allstates-table