So if you give it the command without a decimal value then it just sets it to zero, correct? That's what I see in my testing.
local a = ScenEdit_SetUnit({side="BLUFOR", unitname="Airplane", altitude = 7000, manualaltitude=7010, manualspeed=410})
print(a)
[image]https://i.imgur.com/LSjQ0aj.png[/image]
A few things you can do. One, just add a decimal after the value. Setting the "altitude = 7000." is enough to make it work. Odd that it doesn't also happen with speed, probably something going on with a conversion.
You could also include a conversion so you don't have to think in meters. then you'd do "altitude = (3600/3.281)".
Interestingly enough that works, however I'm running into some oddities setting the math on the manualaltitude side of things. I can divide 3000/3 and it sets it to 3,281 ft. However if I try to divide 3000/3.281 it sets it to 20 ft. Dividing 4000/3 also sets it to 20 ft.
local man = 1000/3
print(man)
local a = ScenEdit_SetUnit({side="BLUFOR", unitname="Airplane", altitude = (3000/3.281), manualaltitude=man, manualspeed=400})
print(a)
Manual override goes to 20 ft.
local man = 333
print(man)
local a = ScenEdit_SetUnit({side="BLUFOR", unitname="Airplane", altitude = (3000/3.281), manualaltitude=man, manualspeed=400})
print(a)
Manual altitude goes to 1093 ft.
333.0 returns 1093 ft.
333.3 returns 20 ft.
I'll cross post this as a bug? Unless I'm missing something.