FlightControl-Master / MOOSE

Mission Object Oriented Scripting Environment (MOOSE) for lua mission scripting design in DCS World
http://flightcontrol-master.github.io/MOOSE/
GNU General Public License v3.0
291 stars 96 forks source link

New function to remove units from a platoon #2103

Open gunterlund opened 7 months ago

gunterlund commented 7 months ago

We have a function in the Brigade that allows us to add groups to a platoon in a brigade . So for instance I can create a platoon, SyrianGarrison=PLATOON:New("Syrian Garrison", 100, "Al Bab Garrison"). this example creates a garrison platoon with 100 groups in it. I use AlBabBrigade:AddPlatoon(SyrianGarrison) to add the platoon to the AlBabBrigade. I can add to this platoon using AlBabBrigade:AddAssetToPlatoon(SyrianPlatoon, 2). Now the platoon have 102 groups in it.

We need a way to remove groups from a platoon similar to adding.
So if I do AlBabBrigade:RemoveAssetFromPlatoon(SyrianPlatoon, 2), the Syrian Garrision will have 98 groups in it.

There is a function called BRIGADE:RemoveAssetFromPlatoon(Asset), but this appears to remove the entire platoon from the brigade. What Im suggesting is different.

gunterlund commented 6 months ago

Hi @funkyfranky any thought on this?

gunterlund commented 3 months ago

Hi @funkyfranky I saw what looked like an update come through for this. will this remove assets at the platoon/squadron level?

so something like Brigade:removeassetfromplatoon(Platoon1,3).. Remove 3 groups from Platoon 1 in the Brigade.

funkyfranky commented 3 months ago

You can use myplatoon:RemoveAssets(3) @gunterlund