Hello,
I'm building a few XML gauges for one of my aircraft, and for elements which require timers, have been using the following code:
(P:Absolute time,seconds) 1 % 1 > !
This, based on what I've read in other threads, should introduce a 1 second timer cycle.
In actual practice, I'm using this timer to increment a variable for each second that it's above a limit, shown here:
Once the variable is incremented above 20, the engine should fail.
However, I'm finding that the engine fails after just 4 to 5 seconds. I have adjusted the values in the timer (example: (P:Absolute time,seconds) 2 % 0.5 > ! )... but still no luck.
Is there something I'm missing?
I'm building a few XML gauges for one of my aircraft, and for elements which require timers, have been using the following code:
(P:Absolute time,seconds) 1 % 1 > !
This, based on what I've read in other threads, should introduce a 1 second timer cycle.
In actual practice, I'm using this timer to increment a variable for each second that it's above a limit, shown here:
Code:
<Update>
(L:ITTModified,enum) 870 > if{ (P:Absolute time,seconds) 1 % 1 > ! if{
(G:Var2,enum) ++ (>G:Var2,enum) } }
(G:Var2,enum) 20 > if{ (>K:TOGGLE_ENGINE1_FAILURE) }
</Update>
Once the variable is incremented above 20, the engine should fail.
However, I'm finding that the engine fails after just 4 to 5 seconds. I have adjusted the values in the timer (example: (P:Absolute time,seconds) 2 % 0.5 > ! )... but still no luck.
Is there something I'm missing?



