1. #1

    WA2 Aura triggers

    Hello, Is it possible to have a weak aura trigger 5 seconds into a ready check? Also, is it possible for a weak aura to trigger when another one hides? Thank you very much.

  2. #2
    High Overlord Ironi's Avatar
    15+ Year Old Account
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    114
    you can use custom triggers + WeakAuras.ScanEvents() + C_Timer.After() to show/hide auras pretty much whenever you want
    Abandon the search for Truth; settle for a good fantasy.
    iKeystones, iLFRDescription, iEncounterEventTracker

  3. #3
    And how does one use weakauras.scanevents? Would it be possible to do an example for me? If the weak auras name is TEST, what would be the custom trigger

  4. #4
    Example:
    Let's say I would like to listen to the ENCOUNTER_START event, and when the encounter starts I would like to do some custom code after 5 seconds. There are many ways to do this, but I'll make an example that uses both WeakAuras.ScanEvents and the build in C_Timer. The following snippet would capture the ENCOUNTER_START event and queue up a function that will be invoked 5 seconds later. That function will broadcast my own event "DO_MY_THING_EVENT". The same function would listen to this event as well and when it happens it will react to it.

    To set up the trigger you would have to select:
    - Type == Custom
    - Event Type == Event
    - Event(s) == ENCOUNTER_START; DO_MY_THING_EVENT

    The custom trigger would then look like this:
    Code:
    function(event, ...)
    
        local encounterId = ...
    
        if event == "ENCOUNTER_START" and encounterId == 1799 then
              C_Timer.After(5, function()
                    WeakAuras.ScanEvents("DO_MY_THING_EVENT")
              end)
        
        end
    
        if event == "DO_MY_THING_EVENT" then
              -- do whatever you want todo
        end
    end

    Know that I could have also just did the code I wanted todo right into the function of C_Timer.After. The benefit of using WeakAuras.ScanEvents is that a completely different WeakAura or trigger can pick up on your own events and react accordingly.

    I hope this example helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •