1. #1

    Weak Aura life indicator

    Hello everyone,

    I'm trying to make an aura to show my current life as a color dynamic text (100% in white, >90% in green, >60% in yellow etc...), but I'm not really confortable with lua coding and I cant make it work. It's actually ok with multiple basic functions but it requires an aura for every threshold so that's pretty bad.

    Any one can give me a hint how to do this ? Thanks

    [edit]: It works ! I dont want to bump this thread uselessly, so thanks to both of you guys ! Cheers
    Last edited by Kylael; 2014-02-04 at 02:31 AM.

  2. #2
    This oughta help you out:

    Tho you'll obviously be needing to use UnitHealth rather than UnitPower.

  3. #3
    Go to animations tab, then in the middle section (main animation) change it to custom and check the color box with a custom function.

    For the custom function use this
        local percent=UnitHealth("player")/max(UnitHealthMax("player"),1)
        if percent>=1 then
            return 1,1,1,1
        elseif percent >=0.5 then
            return (1-percent)*2,1,0,1
            return 1,percent*2,0,1

Posting Permissions

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