#Custom SetDurationInfo with return of duration/expirationTime not working properly
83 messages · Page 1 of 1 (latest)
do NOT call theat function directly.
which function?
well, the function is not the issue. the return is the issue
the function is the issue.
to track a specific CD of a specific unit.
and how that?
does that mean this is not the full code?
this would be the full code.
Why don't you use the duration field to set the duration
because, as you can see, it depends on the role of the opponent/unit.
Yes, make that distinction and set it appropriately?
If you use a custom trigger, then you can just set your duration in the duration field to whatever you want
That's what it's there for
so you mean i shouldnt return anything and just use the timed field with a custom func?
No, if you scroll down you see the duration field
Return your duration and expiration time in there
that's exactly what i was talking about..?
i've tried that before and this didnt really work either so idk
Ah yeye, misunderstanding then
it shouldnt really matter, no?
if i remove my return values, it works fine but my WA doesnt desaturate
did you try deleting the direct function call?
the desaturation is done via conditoons.
no code.
which is obvious
delete the set duration info call.
If you return your duration and expiration time in the custom duration field box, then that's that
It just works
those are just dummy durations
want to get the stuff working before im working with the real numbers
why would i?
beacuse it breaks
that is what breaks this whole thing.
this is what makes it not work.
now it doesnt work at all lol.
i need to set the duration as the weakaura doesnt get the info from anywhere else.
so how is it supposed to know the duration?
bruh.
In the duration box 😄
not working, as i said
It works
it's not.
its not active.
i guess you dont even understand what im trying to achieve.
your trigger is not active. it does nothing besides messing in the internals.
i do.
but you dont know how a trigger works.
you dont return true.
i do know what you want to accomplish, i do know how you can accomplish that, but instead of taking help, you do exact the opposite.
no you dont
thats not how a trigger works.
and how am i gonna do my calculation? how am i gonna get the unit's role?
in the trigger.
you dont
you put the duration in aura_env and then have that in the duration box.
function(event, unit, spell)
if(unit == 'thatOne' and spell == 'innervate') then
local spec = getSpec(unit)
aura_env.duration = spec == 3 and 90 or 120
return true
end
end```
```lua
function()
return aura_env.duration, getTime+arura_env.duration
end```
got it working