Delay inactive sound trigger

Posted by Scotty on Mon 22 Aug 2005 01:52 PM — 3 posts, 17,833 views.

Australia #0
When I have multiple worlds open there is one world that I want to be informed of if there is any activity of a certain type. I've got a couple of triggers which fire a sound when the activiy I'm looking for occurs - both triggers set to only play the sound when the world is inactive.

So far so good.

However - I don't want the sound to be fired unless I've been inactive for a given period. Something like 60 seconds. This is the part I can't figure out.

If I could start a timer when the world became inactive, I could have the timer enable the 2 triggers. But that has it's own problems: For that to work I'd need to disable the triggers when that world became active.

So - I'm looking for a way to achieve my ends. Any suggestions?
Australia Forum Administrator #1
I suppose it depends how you define "inactive" but I would suggest that some sort of plugin that catches your input (OnPluginCommand springs to mind) and makes a note of the time. Then your trigger, rather than being activated and deactivated, simply checks the time "now" and compares it to the time you last typed a command, and decides whether to play the sound (in other words, the trigger does "send to script" rather than play the sound directly).
USA #2
If you have a lot of triggers/etc that you want to do it with (enable after a few minutes of inactivity), you can set a timer, and reset it everytime you send something (with the plugin thing), that command would also disable any triggers you want to be time-sensitive.
And then when the timer fires (it counts down to 3 minutes without any send, because it keeps getting reset to 3) it enabled all the triggers that you want.

It would be easiest to just put those triggers into a group (and you can turn the group on/off, instead of having a bunch of individual triggers).