1. #1

    Post WeakAuras 2: Checking if an aura is active

    Hi.

    The answer is probably trivial, so apologies, but I just couldn't find a suitable answer on the net.

    What is the best way to check if another aura is active?

    In BFA I found something like (WeakAuras.triggerState["MaybeActiveAura"].triggers[1]) worked, but not anymore in 9.0.1

    Would allow me to show certain ability suggestions when a number of others aren't currently available.

    BR,

    Jandof

  2. #2
    Quote Originally Posted by Jandof View Post
    Hi.

    The answer is probably trivial, so apologies, but I just couldn't find a suitable answer on the net.

    What is the best way to check if another aura is active?

    In BFA I found something like (WeakAuras.triggerState["MaybeActiveAura"].triggers[1]) worked, but not anymore in 9.0.1

    Would allow me to show certain ability suggestions when a number of others aren't currently available.

    BR,

    Jandof
    I'm not able to test it myself right now, but feel free to check if the code below works:

    WeakAuras.regions["MaybeActiveAura"].region.states[1]

  3. #3
    For my Rogue i have an Icon appear on my screen if dont have my poisons activated.
    I do it solely in the trigger menu.

    Trigger 1:
    Type: Aura
    Unite: Player
    Aura Type: Buff
    Name: Instant Poison or Wound Poison
    Show on: Aura(s) Missing

  4. #4
    Quote Originally Posted by Dastey View Post
    I'm not able to test it myself right now, but feel free to check if the code below works:

    WeakAuras.regions["MaybeActiveAura"].region.states[1]

    I'm afraid it doesn't work - not in that form at least. Seems to return a reference to a table rather than a boolean.

    What I'm trying to do is show an aura when six other auras (with multiple triggers) are inactive so doing it by adding negations of those triggers manually would result in a huge and quite unelegant aura. I'd also have to change the conditions manually if any of those six base auras change, so it's against DRY.

    Is there a reference sheet somewhere as to the structure of that region data type? It seems to have a "trigger" as an element, but it's another table reference. I found out it contains at least the "type" of the trigger in question, but what we're looking for is dynamic data about the current activity state of the trigger rather than information about its structure.

    I guess I could look it up from the source, but it's probably going to take a long time without any previous knowledge about the project. Still hoping someone would know the syntax by heart.
    Or maybe have a handy snippet on how to dump the table on the screen so that I can see what it contains. Don't know shit about lua programming tbh. =)

    BR,

    Jandof

    - - - Updated - - -

    There seems to be this method: WeakAuras.GetActiveConditions(aura_env.id,aura_env.cloneId)

    According to its description, it would seem to provide exactly the functionality I need. I just can't get it to work no matter what I do. The table it returns seems to always be empty. I've tried replacing the local aura_env with the name of the other aura I need information about but doesn't seem to work either.

    Maybe I'm not using it correctly. What should be done with the clone id parameter if there are no clones? A working example (i.e. one which returns a table that actually contains some trigger state bools) would be greatly appreciated.
    Last edited by Jandof; 2020-10-22 at 01:24 PM.

  5. #5
    I recommend joining the WA discord and asking your question in the help channel. There's several mods/regulars there that are able to easily answer your question.

    There's another way to handle your issue and that's with sending your trigger 2 an event with scanevents.

  6. #6
    WeakAuras.GetActiveTriggers(aura_env.id)
    WeakAuras.GetTriggerStateForTrigger(aura_env.id, triggerNum)

  7. #7
    This:

    Quote Originally Posted by Translit View Post
    WeakAuras.GetActiveTriggers(aura_env.id)
    WeakAuras.GetTriggerStateForTrigger(aura_env.id, triggerNum)
    Works like a charm. Problem solved =)

    Thank you.

    Thanks also to Spriestlawl for those tips. That scanevents idea was good. Although a bit more work, it'd certainly have accomplished the task. I think I have an idea about another UI element it'd be useful for. I definitely have to check out that Discord channel as well. Didn't know one existed.

    BR,

    Jandof

  8. #8
    Hello! Please give an example of an aura.

Posting Permissions

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