Jump to content

Please help with BigFormation respawns


Shahdoh

Recommended Posts

I want to use MOOSE to respawn some bomber groups I have setup using the BigFormation settings. The bombers do everything perfect when left to run normally.

 

The problem is with the MOOSE respawn changing the name of the groups. The non-lead groups lose track of the lead group due to the name change. I have verified the BigFormation information is still on all the groups by using MOOSE to respawn all of the non-lead groups while normally spawning in the lead group. The MOOSE respawns pick up the lead just fine and all goes as planned.

 

I just need to figure out how to change the variable on the non-lead groups to the new lead group name from the MOOSE respawn, but I get lost on how to navigate and assign the change.

 

I have found the information in the "mission" code here (groupId in task 2):

 

                            [63] = 
                           {
                               ["lateActivation"] = true,
                               ["tasks"] = 
                               {
                               }, -- end of ["tasks"]
                               ["radioSet"] = false,
                               ["task"] = "Ground Attack",
                               ["uncontrolled"] = false,
                               ["route"] = 
                               {
                                   ["routeRelativeTOT"] = true,
                                   ["points"] = 
                                   {
                                       [1] = 
                                       {
                                           ["alt"] = 7670,
                                           ["action"] = "Fly Over Point",
                                           ["alt_type"] = "BARO",
                                           ["linkUnit"] = 2212,
                                           ["speed"] = 102.77777777778,
                                           ["task"] = 
                                           {
                                               ["id"] = "ComboTask",
                                               ["params"] = 
                                               {
                                                   ["tasks"] = 
                                                   {
                                                       [1] = 
                                                       {
                                                           ["number"] = 1,
                                                           ["auto"] = false,
                                                           ["id"] = "WrappedAction",
                                                           ["enabled"] = true,
                                                           ["params"] = 
                                                           {
                                                               ["action"] = 
                                                               {
                                                                   ["id"] = "Option",
                                                                   ["params"] = 
                                                                   {
                                                                       ["variantIndex"] = 1,
                                                                       ["name"] = 5,
                                                                       ["formationIndex"] = 12,
                                                                       ["value"] = 786433,
                                                                   }, -- end of ["params"]
                                                               }, -- end of ["action"]
                                                           }, -- end of ["params"]
                                                       }, -- end of [1]
                                                       [2] = 
                                                       {
                                                           ["number"] = 2,
                                                           ["auto"] = false,
                                                           ["id"] = "FollowBigFormation",
                                                           ["enabled"] = true,
                                                           ["params"] = 
                                                           {
                                                               ["groupId"] = 942,
                                                               ["formationType"] = 15,
                                                               ["lastWptIndexFlagChangedManually"] = true,
                                                               ["posInGroup"] = 0,
                                                               ["posInWing"] = 0,
                                                               ["lastWptIndex"] = 10,
                                                               ["lastWptIndexFlag"] = true,
                                                               ["posInBox"] = 1,
                                                               ["pos"] = 
                                                               {
                                                                   ["y"] = 50,
                                                                   ["x"] = -80,
                                                                   ["z"] = 120,
                                                               }, -- end of ["pos"]
                                                           }, -- end of ["params"]
                                                       }, -- end of [2]

 

 

I need help on how to change that variable after I do the MOOSE respawn of:

 

SpawnBG1_1 = SPAWN:New( "BG_1_1" ):ReSpawn()
SpawnBG1_2 = SPAWN:New( "BG_1_2" ):ReSpawn()
SpawnBG1_3 = SPAWN:New( "BG_1_3" ):ReSpawn()
SpawnBG1_4 = SPAWN:New( "BG_1_4" ):ReSpawn()

 

 

Thank you for any help you can provide (And telling me to use AI-formation in MOOSE is not the answer I am looking for.)

Link to comment
Share on other sites

  • 7 months later...

You would have to get the lead group ID (Group.getID) and then create the task table via script and push it to the following groups controllers. Not too familiar with Moose but maybe Mooses spawn functions return the group ID?

 

SpawnBG1_1 = SPAWN:New( "BG_1_1" ):ReSpawn()

 

What is SpawnBG1_1? An ID? Object?

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...