Page 1 of 1

Set manualSpeed through Lua

Posted: Thu Feb 11, 2021 4:33 pm
by robotsanta77
I'm having trouble setting an air unit's manualSpeed with the ScenEdit_SetUnit function. Whenever I try to run a script setting an air unit or group's manualSpeed it seems to set the unit's manual speed to their Cruise speed instead. Am I missing something? is there some doctrine setting I need to uncheck or something else? When I try running this:
ScenEdit_SetUnit({guid = 'The Unit GUID', manualSpeed = 600})
it just sets the speed to the cruise speed. I've found other threads with examples of manualSpeed being changed in the SetUnit and I've tried with a decimal digit and as a string but it still isn't working for me.

It might be work noting I'm attempting this on Command Professional Edition.

RE: Set manualSpeed through Lua

Posted: Thu Feb 11, 2021 5:02 pm
by Parel803
I'm no expert or even close but found for subs the manualSpeed=OFF, smart Lua people posted that but can't find it back, sorry.
Hope that works:
ScenEdit_SetUnit({guid='50PVO4-0HM6EO0TSI8IB', manualSpeed=OFF, manualSpeed=400})
with regards Gert-Jan

RE: Set manualSpeed through Lua

Posted: Fri Feb 12, 2021 12:19 am
by robotsanta77
Thanks for the response but it's still giving me the same problem. I've also just now been able to attempt the script with the commercial version of CMO where it seems to work entirely as intended. I'm thinking there may just be an issue with the professional edition.

RE: Set manualSpeed through Lua

Posted: Fri Feb 12, 2021 4:40 am
by michaelm75au
I have noticed (depending on the version of PE) there seems to a lag in the Lua fixes; probably due to how many different versions are currently out there (CMANO, CMO, and then the PE variants)

RE: Set manualSpeed through Lua

Posted: Fri Feb 12, 2021 5:41 pm
by robotsanta77
I'm starting to think that must be the case. I'm using CPE version 1.15.4.4 it that matters. I've also tried it on 1.15.3 with the same results.