- Messages
- 531
- Country

Hello experts,
For specific reasons, I would like to store in a local variable (L: var) the exact time at which the aircraft leaves the ground during take off.
I use the ABSOLUTE TIME sim var for this, that I read like this: SimVar.GetSimVarValue("E:ABSOLUTE TIME", "seconds");
If I display this value in the console, it shows it works perfect, it changes as expected when time goes by...
When the aircraft leaves the ground, I do something like this:
The strange thing is that the local variable named "MY_TAKEOFF_TIME" does not reflect the value of time as expected. This should be very simple but it does not work as expected...
I suspect it is a problem of value type or unit, I tried using "number" instead of "seconds" but it does not work any better.
Any idea?
Thank you,
Eric
For specific reasons, I would like to store in a local variable (L: var) the exact time at which the aircraft leaves the ground during take off.
I use the ABSOLUTE TIME sim var for this, that I read like this: SimVar.GetSimVarValue("E:ABSOLUTE TIME", "seconds");
If I display this value in the console, it shows it works perfect, it changes as expected when time goes by...
When the aircraft leaves the ground, I do something like this:
let time = SimVar.GetSimVarValue("E:ABSOLUTE TIME", "seconds");
SimVar.SetSimVarValue("L:MY_TAKEOFF_TIME", "seconds", time);
The strange thing is that the local variable named "MY_TAKEOFF_TIME" does not reflect the value of time as expected. This should be very simple but it does not work as expected...
I suspect it is a problem of value type or unit, I tried using "number" instead of "seconds" but it does not work any better.
Any idea?
Thank you,
Eric


