DesiredSpeed Bug on Lua Script ?

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
Cheche
Posts: 11
Joined: Sun Feb 05, 2023 6:23 pm

DesiredSpeed Bug on Lua Script ?

Post by Cheche »

Hello,

I do not understand why this is not working concerning desiredSpeed with this lua script :

local myroute = {
[1] = {description='Wpt1', latitude='48.5', longitude='1.1', DesiredAltitude='18000 ft', desiredSpeed=400},
[2] = {description='Wpt2', latitude='48.5', longitude='2.2', DesiredAltitude='19000 ft', desiredSpeed=430},
[3] = {description='Wpt3', latitude='48.5', longitude='3.3', DesiredAltitude='20000 ft', desiredSpeed=480},
[4] = {description='Wpt4', latitude='48.5', longitude='4.4', DesiredAltitude='21000 ft', desiredSpeed=520},
[5] = {description='Wpt5', latitude='48.5', longitude='5.5', DesiredAltitude='22000 ft', desiredSpeed=540}};
local ac1 = ScenEdit_AddUnit({name='Viper 1', side='BLUE', DBID='3643', LoadoutID='17310', type='Air', latitude='48.5', longitude='1.0', altitude='15000 ft', heading=090, manualSpeed=400});
ac1.course=myroute;

When using this script, desiredSpeed above 480 kts are not taken correctly on manual override ... speed is cuffed to 480 kts ... unable to go beyond (cf picture at wpt4 ordered 520 kts ...but 480kts taken ...).
bugdesiredspeed.jpg
bugdesiredspeed.jpg (476.83 KiB) Viewed 699 times
Any idea to solve this issue please ?

Thanks by advance.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: DesiredSpeed Bug on Lua Script ?

Post by KnightHawk75 »

Cheche wrote: Tue Feb 28, 2023 8:22 pm Hello,

I do not understand why this is not working concerning desiredSpeed with this lua script :
...
Thanks by advance.
Nor do I.
It looks like you have indeed found a nasty bug in 13XX.X

There are also bugs in the gui dialog related to this and trying to set it, though with enough pissing around you can get it to seemingly take in the gui (basically deselect\select military again, then enter the number and put cursor into description area, and exit), can't do it though lua though.

Additionally if you do jack it up in the gui, and right after you dump unit course via lua you will see it's there, BUT you'll also see for some reason wpt5 doesn't get a WayPoint field, which looks like another bug?

BTW even if you include presetThrottle='Full' additions in lua (to set military) it still ignores any speed over cruise, even if after setting that, which does take ironically, if you copy the course, reset the speeds again and reapply it, it will still not take. Incidentally if you also set the WayPoint fields (new in tiny) to match the .speedDesired field in there, it also doesn't take.. I mention it only for completeness.

I would report this in tech support, god only knows how many scenes this effects.

Also I checked for this problem in build 1147.52 ...it is present there as well...back to 1146.x at least
Cheche
Posts: 11
Joined: Sun Feb 05, 2023 6:23 pm

Re: DesiredSpeed Bug on Lua Script ?

Post by Cheche »

Okay thks.
Indeed same issue for me.
Do you confirm i have no action to do for techsupport ? It will be taken into account or do i need to transfer thks post on techsupport forum ?
Thks lot.
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: DesiredSpeed Bug on Lua Script ?

Post by michaelm75au »

It is doing a sanity check based on the current altitude and throttle setting. Which is probably restrictive as you don't care or rather you care about it for the altitude/throttle at the WP. As you are specifically setting it to value.

Has always been this way.
Michael
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: DesiredSpeed Bug on Lua Script ?

Post by michaelm75au »

Added to next build. Sanity check is only to ensure it doesn't exceed the unit's overall maximum speed.
Michael
Cheche
Posts: 11
Joined: Sun Feb 05, 2023 6:23 pm

Re: DesiredSpeed Bug on Lua Script ?

Post by Cheche »

Mmmh i know that if i order a speed not "reachable" at the specific altitude it will cuff it with the sanity check.
Nevertheless, for a Rafale at 20000ft with the subconfiguration setted ...520kts is clearly reachable. If i manualy order military or afterburner...no issue to go beyond 480kts TAS (wich is roughlty M.8 at 20000ft).
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: DesiredSpeed Bug on Lua Script ?

Post by KnightHawk75 »

michaelm75au wrote: Thu Mar 02, 2023 8:49 am Added to next build. Sanity check is only to ensure it doesn't exceed the unit's overall maximum speed.
Thanks michaelm!
Post Reply

Return to “Lua Legion”