I'm trying to make a WeakAura that will constantly display how long it is since a message was last posted containing a specific phrase. So the first time the message is posted I would want the timer to start counting up, the next time it is posted it should then reset to zero and start counting up again.
I have tried to do this with Trigger -> Other Events -> Chat Message -> Message Contains -> my phrase
The problem is I want the text to be displayed all the time, so I have to set the hide duration of the trigger to 0. I then use Actions (I also tried Conditions) to save the time the trigger was "Showed" or "Active"
The problem is that since the duration is set to 0, the trigger never stops "being active" after it is first activated, so even if the phrase is reposted, the timer isn't reset. But if I don't set the duration to 0, the text disappears which I don't want
Basically I would like a way to do this, and the easiest way I can think of is with a custom function. That way I could, inside the trigger, reset the timer whenever a message comes in with the matching phrase. Does anyone know event I would have to listen for and so on? I assume this can be done as a custom function since WeakAuras can do it already
I'm not sure if I understand your question correctly, but you could maybe add a 2nd trigger that checks for something thats always gonna be true, and set activation to "any triggers". For instance, if it's something you want to do during combat, you add a second trigger that checks if combat is true. Or you add a second trigger that checks if you have a certain spell you always have. You can then have the count trigger do whatever you want.
Not sure if this is what you mean, but it's a something I use sometimes in my WAs.