#Can a WeakAura trigger on a layer ID change

15 messages · Page 1 of 1 (latest)

oak quiver
#

I currently use melroy999 ShardTracker from github. His addon displays and also prints text in chat but cant seem to find a way to track with an aura what it prints. trigger -other events -chat message- message type- system- contains "Moving to shard"? Just looking for a way to make a weak aura that announces when the shard has changed (which happens ALOT). Gonna make it Large text , wiggle and red in the center of screen .

chrome reef
#

No event for print. You'd need to hook it which it a bit yikes.
You could edit the addon to send a ScanEvents, or ask the author to add it if you're in touch with them.

#

!scanevents

chrome rover
#

Specifically, the print you mentioned happens in Line 64 of ShardTrackerEventHandler.lua

#

As asakawa mentioned, just make a ScanEvents call there and have an aura with a custom trigger react to that

oak quiver
#

Lua noob here with zero custom knowledge.
How would I change line 64

print("<ST> Moving to shard "..zone_uid..".")

to have it come up in the "say" channel instead ? That I am guessing I could track without any custom stuff.

I did try to enter WeakAuras.ScanEvents("CUSTOM_EVENT_NAME", argument1, argument2, ...) but just killed the addon LOL.

I have tweaked sizes of text / colors / opacities and such but never moved code around.
Thank you all for the replies.

chrome rover
#

that said, implementing the ScanEvents call is simple

#

and then have a WA that has a custom event trigger for that event

#

I tried it, it works fine.

oak quiver
#

OK ty very much will try it. I put it below it not above .

oak quiver
#

Well for my first time ever making a custom trigger I think I did it right.

--Event(s): YOUR_SHARD_CHANGED
--Trigger
function(event, zone_uid)
if event == "YOUR_SHARD_CHANGED" then
--Use the arguments for this event
return true
end
end

#

Now to see if i can make one from the same event that shoots something to chat for the time stamp.