After a recent exchange in the Q&A thread about mission template triggers and their various delay and check intervals, I just so happened to have a PM exchange with motomataru and he pointed out something I wasn't aware of when dealing with delays and mission templates triggers:
So, I ran a test with the following debug trigger:
I both included and did not include a conditional test (eq, 1, 1) in the conditions block; the inclusion of such an operation had no effect. The result was exactly as moto had indicated--the trigger fired every 6 seconds after its initial firing somewhere in second 1, typically around 600 milliseconds.
However, the delay between the two blocks worked correctly in that the second millisecond report was always 2 seconds following the first...it was just that the first did not appear every 4 seconds, but every 6.
Out of curiosity I included a re-arm delay. The re-arm delay works correctly.
I tested the following trigger:
And the screen displayed the following:
So the delay was always 2 seconds and the call interval was always 11 seconds 4+2+5.
But now here's the crazy thing...if the conditions block fails, the check interval is correct.
With this trigger, where the conditions block should fail 50% of the time:
I got the following pattern:
So, the re-arm delay definitely works correctly, but the "problem" with the delay interval only comes in when it is actually used...which leads me to think that it is less a "bug" and more a very strange idea on the dev's part of what would be useful...
Also, I've done numerous checks on timed triggers and when they initialize themselves on mission-start. The above checks confirm what my other tests have demonstrated--the check interval does not affect when a trigger will first fire in the mission. All timed triggers, regardless of call interval, will be initialized in the first second of the mission. I had previously been under the mistaken assumption that they would begin X seconds into the mission...with X as whatever their check interval was.
Has any one else noticed these things? Had I either missed the boat or misunderstood the intention of these values?
motomataru said:Simple check: an n-second trigger with an n/2 delay, display_message the mission clock. It'll show the trigger firing every n+n/2 seconds.
So, I ran a test with the following debug trigger:
Code:
(4, 2, 0, [(store_mission_timer_a_msec,reg0),(display_message, "str_reg0"),],
[(store_mission_timer_a_msec,reg0),(display_message, "str_reg0")]),
However, the delay between the two blocks worked correctly in that the second millisecond report was always 2 seconds following the first...it was just that the first did not appear every 4 seconds, but every 6.
Out of curiosity I included a re-arm delay. The re-arm delay works correctly.
I tested the following trigger:
Code:
(4, 2, 5, [(store_mission_timer_a_msec,reg0),(display_message, "str_reg0"),],
[(store_mission_timer_a_msec,reg0),(display_message, "str_reg0")]),
Code:
600
2625
11656
13682
22714
24715
33747
35748
But now here's the crazy thing...if the conditions block fails, the check interval is correct.
With this trigger, where the conditions block should fail 50% of the time:
Code:
(4, 2, 5, [(store_mission_timer_a_msec,reg0),(display_message, "str_reg0"),(store_random_in_range, reg0, 0, 2),(eq, reg0, 0)],
[(store_mission_timer_a_msec,reg0),(display_message, "str_reg0")]),
Code:
521
4522
6535
15556
19570
21576
30601
34606
36609
Also, I've done numerous checks on timed triggers and when they initialize themselves on mission-start. The above checks confirm what my other tests have demonstrated--the check interval does not affect when a trigger will first fire in the mission. All timed triggers, regardless of call interval, will be initialized in the first second of the mission. I had previously been under the mistaken assumption that they would begin X seconds into the mission...with X as whatever their check interval was.
Has any one else noticed these things? Had I either missed the boat or misunderstood the intention of these values?