1. #1

    Question Weakauras - custom anchor documentation

    Cheers everyone,
    it looks like they added a new feature (or at least it is new to me...) in the anchor settings: the custom one.


    I'd like to dynamically change the offset of my Aura but I can't find any documentation about the custom anchor feature. What am I supposed to write there "syntax-wise"? Has anyone a clue?

    Thank you in advance

  2. #2
    It looks like that needs to return a frame to anchor to.

    If you want to change offsets I think you'll need a custom translate animation.

  3. #3
    Quote Originally Posted by quthar View Post
    It looks like that needs to return a frame to anchor to.

    If you want to change offsets I think you'll need a custom translate animation.
    Thank you for the heads-up! I'm working a new UI and I'm trying to recreate the dynamic behaviour of the target's buffs/debuffs/castbar in the default UI.

    I'm using the Raven addon for the buffs/debuffs customization and I've achieved exactly what wanted. I'm now working on a way to dynamically position the castbar (one I created with WA) underneath the buff/debuffs cluster.

    The logic I had in mind is:

    Everytime a new aura is applied/removed from the target > fire a function that calculates how many auras are present on my target > offset the Y position of my castbar accordingly. Does it make any sense?

    So let's say the buff icons I've set are 10px high and there can be 5 icons in a row.
    If the target has 1-5 buffs up, the castbar should be offset by 10+ px, if the target has 6-10 buffs up, the castbar should be offset by 20+ px, ....

    I'm struggling on how to implement this logic in Weakauras. What should I do? Setup a trigger that watches for auras changes and then create a custom "slide" animation that counts the auras on target and offsets the castbar accordingly?

    Thank you for your support!

  4. #4
    For moving stuff I use
    Code:
    function()
    aura_env.region:SetOffset(x,y)
    end

    It basically overwrites the position of your WA. (x should be a fixed value here, and you calculate y)

  5. #5
    That's exactly the situation the anchor options are for.

    Set Anchored To to Select Frame and then select the frame that contains the buffs/debuffs. Then the offsets will be relative to that frame.

    You'll also want to change Anchor from center to one of the corners or edges, but which one will depend on your setup.

  6. #6
    I can't post links because it's a new account, but the documentation for custom anchor function was added to the wiki.
    Search for "New! Custom Anchor Function" in the navigation menu

Posting Permissions

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