ajcross Very Active User
Joined: 23 Dec 2003 Posts: 113 Location: Kansas City
|
Posted: Tue May 11, 2004 9:28 am Post subject: Alternative for 'Every NN Seconds' condition |
|
|
I found an alternative for Every NN Seconds because I had too many apparently. This uses a flag in the condition to tell when to retrigger the condition.
Condition
Mission Loaded
Action:
...
Set persistent variable 'flag' to "0"
...
Condition:
Persistent variable 'flag' is Exactly 0
... other conditions ...
Action:
Set persistent variable 'flag' to 1
Preserve trigger
Wait 10 seconds
...other actions...
Set persistent variable 'flag' to "0"
This starts with the condition active and does the actions after the conditions are ment and after the wait time. This is like Every NN seconds.
You can have the trigger actions fire right away by moving the ...other actions... above the Wait
Condition:
Persistent variable 'flag' is Exactly 0
... other conditions ...
Action:
Set persistent variable 'flag' to 1
Preserve trigger
...other actions...
Wait 10 seconds
Set persistent variable 'flag' to "0"
You can trigger it to fire right away based on other triggers.
Condition:
... other conditions ...
Action:
... other actions...
Set persistent variable 'flag' to "0"
... other actions...
You can have it disabled to start and trigger it as above. This is nice because Every NN triggers every nn seconds based on elapsed time. This will start it from the first time the trigger is set off.
Condition
Mission Loaded
Action:
...
Set persistent variable 'flag' to "1"
... _________________ Andy Cross |
|