1. #1
    Deleted

    [WA] Custom Trigger not working anymore

    UPDATE:
    Fixed it with an ugly workaround

    Code:
    function()
        local charges, maxCharges, start, length = GetSpellCharges(148039)
        
        if charges == maxCharges then
            length=99999999
        end
        
        return length, start+length, nil, nil
    end
    I've built an custom trigger some time ago to display an icon for sacred shield.
    Basically just "cooldown-spiral" for recharging the stack + text(stack info): Then I have this sliding in animation.

    Okay this has worked fine for me. But I haven't used it for a while. Now it's broken - not sure if it's a WA update thing or I just messed things up in the meantime. Well I've no idea why its broken. But it's obvious why it happens: When I have 3 stacks it triggers on every god damn frame. When I have 1 or 2 stacks it only triggers if I had 0 stacks before (since it wasn't visible)
    So why is this a problem? As i said: with 3 stacks it triggers on every frame => Animation on every frame

    So this would mean it also untriggers on every frame if I have 3 stacks, right? Nah it doesn't. Have debugged this, the old-school print() way

    I made a short video showing the problem

    As you can see: 2 -> 3 charges: broken but 0 -> 1 charges: working. Do not wonder, the greyed out icon is another weakaura

    I probably could fix this using a third aura with charges==3. (set custom trigger in this aura to charges > 0 && charges < 3). But that's not what I want.
    Any ideas?


    ------------------------------------------------------------------------

    Trigger Type: Custom -> Status -> Every frame

    Code:
    function()
        charges, _,_,_ = GetSpellCharges(148039)
        return charges > 0
    end
    Custom Trigger

    Code:
    function()
        charges, _,_,_ = GetSpellCharges(148039)
        return charges < 1
    end
    Custom Untrigger

    Code:
    function()
        _, _, cdStart, _ = GetSpellCharges(148039)
        return 10, cdStart + 10, nil, nil
    end
    Duration Info

    Code:
    function()
        charges,_,_,_ = GetSpellCharges(148039)
        return charges
    end
    Stack info

    WA String
    Code:
    dCe8iaGiPiAuuKtrKwLuu9kuOMLsClui7cLsddfDmvXYKk1ZqbtteDnkQ2MuO6BsHY4uvCoPcZtkqUhkf7tkiDqfjl  eL0drjMirWfLIYgLI0hLkAKsH4KOu1kLQMPuiDtPaStvPFkfudfLklvvjEQKPQOUQuqmwkkNLiAUsryVq)vknyQomO  fRi1JP0KjQltAZIWNPWOvsNwPwTua9Av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)6HvIHWg7SWKuQNCYjNC7keyO3s7s7sl5SH8o1OsvoNLviWqptpj)W  KHoKs9Kto5Kd0yaeKBxHad9OEvit9up1t9up1JLDCr(xcdam2zbwjgcBSZctsPEYjNCYBxiVDHCRCfqqSqEl5SH8o1  OsvoNLviWqptpj)WKHoKs9Kto5Kd0yaeK)WCHCRCfqqqoJj)H5c5InFHCXMt9QqgRXPTxQY5VWFfzfl74I8pwjgcBS  ZctsPEYjNCYTRqGHElK3U0U0soBiVtnQuLZzzfcm0Z0tYpmzOdPup5Kto5angab52viWqpYBOKZK6vHmw2v1(vSgPY  WqXACA7qSdKvSUuLZFH)k((K8dtg6adSsKfbwnJ3vdH9KZU93khRvDBSg4BYKyXZqzCgRXPTcTlfGtJva5QiWzSUTW  GR4Bhy9p4XgNXadSSC4D4mw3wyWvSy3un6usG9VyG1402aYvrGSIL8orITDWJj4mw)dESXzmWalqMR4mw)dESXzmWa  RXPTwo8oKvSgN2EPQfzfRlvT4mw3wyWv89bdSaqRIZy9p4XgNXadSgN2kG)kongyLilIA3Gv8T7KybuJDwmpjvXABZ  cS2ID0AZ)PCnuz89bRVB4ejonW3gJjwqz5DSZciVnaBddfC4mgyjXTCSIVjtI1wgRcAbQm516w5YyjVVg4qyJDxkon  wIX)myByOGdFFWAicW2Wqb4mw2Xf5FSsme2yNfMKs9Kto5KBxHad9wAxAxAjNnK3PgvQY5SScbg6z6j5hMm0HuQNCY  jNCGgdGGC7keyOh5niYFOEviJ1LQC(l8xX3NKFyYqhyGL8(s5WjS3MfyXErOGeqR2eS3Mfxtm10B(oM0YoihkVfTSY  17u5gGkK3cdSS5mxolrbYkgyDy1nBFylt2(Gvx47tYUFWara

    GetSpellCharges() Documentation
    Code:
    charges, maxCharges, start, duration = GetSpellCharges("name") or GetSpellCharges(id)
    
    Arguments:
      name - Name of a spell (string)
      id - Numeric ID of a spell (number, spellID)
    
    Returns:
      charges - Current amount of charges left for a spell (number)
      maxCharges - The total amount of charges given for a spell (number)
      start - The value of GetTime() at the moment the cooldown began. NB: This value never resets! (number)
      duration - The length of the cooldown in seconds (number)
    Last edited by mmoccaf507ef67; 2015-03-31 at 05:36 PM.

Posting Permissions

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