Page 1 of 1

[LUA Function Request] Enable "Group Slow Down" toggle in LUA

Posted: Wed Jul 19, 2023 11:25 am
by Bashkire
Afternoon all,

As part of my exercise to code together a mission and create a small library for myself, I've been working with waypoints and setting courses in LUA - specifically to get a task group to transit a PIM and reach their objective at a designated time as per mission orders.

I'm able to generate a string of waypoints and set the speed required for the task group, and I can even set its formation, but this is where things start to get squiffy.

When the task group reaches each waypoint and turns, even fractionally, the entire formation slows from its speed of 15 knots to 8, or even 2 sometimes, to allow the formation to swing round and get everyone into position.

If you assign a string of waypoints to a group normally (via the F3 key) a tick box is available when clicking on the group to enable or disable the group slowing down to allow the formation to reform and get back to their assigned stations, but this functionality is not available in LUA. I think this is an oversight and would be of great use to scenario designers who would be able to make use of this command in numerous ways.

I don't know how easy it is to get a function applied to the game, but I humbly request that it is done to give designers every tool that they require to help this game go from strength to strength.

Thank you.
- Bashkire

Re: [LUA Function Request] Enable "Group Slow Down" toggle in LUA

Posted: Fri Jul 21, 2023 6:36 am
by michaelm75au
Simple to add that to the 'group' wrapper' where it resides.
Will be something like this.

Code: Select all

local g = ScenEdit_GetUnit({name='CVN BG', guid='9506a165-6e44-40dd-b721-f9c07e056bdb'})
print (g.group.leadSlowsDown)
g.group.leadSlowsDown = true

Re: [LUA Function Request] Enable "Group Slow Down" toggle in LUA

Posted: Fri Jul 21, 2023 8:48 am
by Bashkire
I- Hang on, wait.
Is this functionality already in the program? Have I just been very stupid and missed this?

Re: [LUA Function Request] Enable "Group Slow Down" toggle in LUA

Posted: Fri Jul 21, 2023 9:46 am
by michaelm75au
No, it is not there yet. It will be added to the 'group' wrapper on a future build.

Re: [LUA Function Request] Enable "Group Slow Down" toggle in LUA

Posted: Fri Jul 21, 2023 12:45 pm
by Bashkire
Oh thank heavens.
Cheers for putting it on the list!