#how do I get states[i].expirationTime for a combat log trigger with Hide Timed Duration?
40 messages · Page 1 of 1 (latest)
In what context? Custom Text? if so then aura_env.states[triggerNum].expirationTime will have the value, but you're already so close then I don't think this is what you mean?
Its for an icon for a different summoned creature (Shadowfiend) where I have the opacity reduced if the spell is on cooldown OR if I already have a different pet active - just trying to shave off those potential 3 seconds wasted of eye of the void casting a shadowbolt only to expire before the cast can complete
thank you for your time btw
its for a custom condition in the conditions tab
This is trigger 3
And trigger 4 is the cast time for my pet (eye of the void) shadowbolt
so I am trying to essentially have it so if the expiration time of the shadowbolt cast is > expiration time of trigger 3 (eye lifetime) consider shadowfiend is ready for summon
i have the proper compound conditionals to only check if the lifetime for eye is < 3
what I found from testing is that trigger 3 expirationTime was always evaluating to something > 30
Then that makes sense of why you said states[i] instead of aura_env.states[i], as a Custom Check function does indeed have the states table sent in to it, and we usually call it states.
But assuming you're using a number instead of i then that is correct.
expirationTime is always a value similar to GetTime. I think you're expecting it to be a "remaining time" type value, but it is not.
local remaining = expirationTime - GetTime()
wonderful, i would have never figured that out, thank you so much!!
can you help me wrap my head around this, is this condition check called every frame that the weakaura is activated by default?
nevermind I can look up the documentation for GetTime()
im still confused why expirationTime was always a value higher than the number I input for Hide Timed Duration for the combat log trigger
GetTime is the number of seconds your PC has been on, essentially. It's arbitrary but used throughout the API. Everything is relative to that.
So you want a trigger to be active for 3 seconds, say. The 3 doesn't mean anything. What does mean something is that it should be active until GetTime() + 3
And so that is the value that's stored for the trigger. It can be checked at any point and will always give useful info.
wow, no wonder im so lost
I didn't fully comprehend what you're doing but it's basically going to look like
function(states)
return states[1].show and states[2].show and states[1].expirationTime < states[2].expirationTime
end
Custom Checks are not run every frame by default. This function would be checked any time any trigger in the Aura updates.
In the example function I typed though, you see that you don't even really care what "remaining" value anything has. All that matters is will xtrigger end before ytrigger
ohhh wow ok
for this 1 is the eye trigger and 2 is the shadow bolt trigger?
well I understand what you are trying to tell me
so just in case you can come up with the function before me I will detail everything -
theres 3 relevent triggers (theres one trigger for shadowfiend being on cd but thats easy/seperate condition)
2 - hasPet (i need this in case the eye dies early for some reason)
3 - combat log - successfully cast eye of void - hide timed duration 30(lifetime of eye)
4 - combat log - cast start shadow bolt (for my pet) hide timed 3(cast time of shadowbolt)
this condition desaturates and reduces opacity for my Shadowfiend icon so I want this condition to be true if:
I have my eye of the void summoned AND (remaining lifetime of eye > 3 OR (eye is casting shadowbolt AND shadowbolt remaining cast time > remaining lifetime of eye))
"This function would be checked any time any trigger in the Aura updates." with this in mind I added a duplicate trigger(5) of the eye that had a duration of 27 so that the logic can be checked at the 3 sec mark and it works!!!! thanks again so much 🙂
function(states)
return
states[2].show and
states[3].show and
(states[5].show or
states[4].show and
states[4].expirationTime < states[3].expirationTime)
end
Is this thing an actual pet? They're usually "guardians" which wouldn't activate a HasPet trigger
The trigger 5 check could be done outside of code, in the Conditions.
[if - any of - trigger5 - active - OR - custom check - then]
yeah its a pet i can control it , its on season of discovery as a rune ability so no clue but wa seems to recognize it as a pet - /petattack macros etc work with it
is this recommended for performance?
ive been working on a huge comprehensive weakaura for shadow priest season of discovery for a while now
really priest in general
im pretty good with using the ui and have some understanding of custom triggers but using state tables was totally new to me, its fascinating
for custom conditionals