|
jat63 Wanderer
Joined: 22 Sep 2003 Posts: 53 Location: United Kingdom
|
Posted: Mon Jun 25, 2007 8:30 pm
[1.33] Wait triggers with a null pattern |
I have been trying to find a way to produce a fine grained timer of about 10 events a second. Playing about with triggers and using the wait state I noticed that if the pattern is left blank the trigger will keep firing each time the wait amount is completed. So, setting the wait delay to 100 with a blank pattern produces the 10 events per second effect I need. The best alternative I have found so far is to use the alarm state where the best I can achieve is a delay of 0.501 so only two events a second, not quite was I was looking for.
However, I suspect that using a wait trigger with a null pattern may be an unexpected side effect or bug because if I try and set the ID field to anything other than blank the effect stops and the trigger now only fires after new text has been received.
Will I be safe to use a wait trigger in this way or may the effect go away with a future release? If it will could a way to produce a finer grained alarm be added? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jun 25, 2007 9:31 pm |
As you mentioned using #WAIT in that manner will likely have many unintended consequences although I can't speak to what they are specifically. Furthermore I think the #WAIT command will eventually be deprecated (as opposed to simply being discouraged now).
When you want to produce 10 events per second, exactly what do you mean? You want to be able control 10 units in a given second and then be able to take actions at deterministic intervals? in other words do you want to be able to run something in unit 3 and unit 7 of second and then something else at 1, 4 and 9 and yet another only at unit 6? |
|
_________________ Asati di tempari! |
|
|
|
jat63 Wanderer
Joined: 22 Sep 2003 Posts: 53 Location: United Kingdom
|
Posted: Mon Jun 25, 2007 9:49 pm |
Sorry, I didn't mean use of the #WAIT command. I meant using the #trigger command with the wait state parameter. I have long ago removed all use of the #WAIT command after numerous very large hints on this forum.
What I mean is that I need an event that operates ideally 10 times every second with a 100ms delay between events. The actions that happen at these periods is dependent on a very complex state machine. So, it comes very close to your first statement of needing to have an ability to perform an action based on the state table at regular 1/10 second intervals. |
|
|
|
|
|