|
Quintus Newbie
Joined: 29 Aug 2013 Posts: 4
|
Posted: Thu Aug 29, 2013 4:44 pm
Trigger/script that fires if text not seen in last X seconds |
I'm trying to create something that will fire if a certain line hasn't been seen in the last X seconds. I've played with duration/wait triggers but it seems these work in the opposite order: trigger, THEN do something after X seconds.
Basically, I want to create something that will fire if I haven't been in combat for 10 seconds.
Any suggestions? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Aug 29, 2013 10:14 pm |
You will need two triggers. The first trigger will be a pattern-and-wait multistate trigger, with the pattern part being whatever line you use to determine you are out of combat now and the wait part being 10000 (the interval is in milliseconds). The second trigger will be whatever line you use to determine you are now in combat. Both triggers will need to be named.
In the first trigger, the code for the pattern part will set a variable called InCombat to 0 and will turn on the second trigger. The code for the wait will do whatever you wanted to do after 10 seconds has elapsed with no combat. In the second trigger, the code will first set that variable to 1, then change the state of the first trigger to 0, and finally turn itself off. This will prevent the wait state from ever firing, should the second trigger fire before 10 seconds have elapsed. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Quintus Newbie
Joined: 29 Aug 2013 Posts: 4
|
Posted: Tue Sep 10, 2013 10:20 pm |
This worked perfectly! Thanks!
|
|
|
|
|
|