Create group of different ship types AND helos?

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
hellfish6
Posts: 695
Joined: Sun Jun 15, 2008 2:09 am

Create group of different ship types AND helos?

Post by hellfish6 »

Hi. I'm trying to make a quick battle that lets you pit 3 ships vs 3 other ships, along with a single helo for those ships that carried them. I'm looking through the tutorials and searching and I'm also realizing that my scripting skills have severely atrophied over the years... any help? None of the existing QBs mix types in their groups, and the groups I see are all aircraft.

I'm using pre-defined groups (so like option A is ship1 and helo+loadout, ship2 and helo+loadout, and ship3 with a helo+loadout, option B is a different set of ships, etc.)

How to I write a lua that spawns the three ships and their embarked helos into a group, within about 5nm of each other?

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

RE: Create group of different ship types AND helos?

Post by KnightHawk75 »

There are easier ways to do it in a very down and dirty way but here (Air_Surface ASUW Packages_demo.zip attached) is something similar to what you wanted I had from awhile back that I tweaked a little for your purpose to ensure proper formation related stuff. Basically it's a QB setup for 3 vs 3 surface ship warfare.

It uses a package definition system to define what gets added, and how, obviously you'll need to change the packages to the dbid and loadouts you want for you and the enemy (blue uses sceneGlobals.UnitPackages1 and Red sceneGlobals.UnitPackages2. The demo units currently marked up are just that. You can find those tables near the top of the script. I'd say it's self explanatory but it's probably not even with the comments. lol [;)] But basically each package contains 1 or more unit entries and each unit can have sub units (aircraft), along with other data that controls how things get generated. Generally don't worry about lat\lon for "units" as they all get replaced during generation when using formation option.

Unzip the contained folder into your CMOInstallFolder\Quickbattle folder.
Attachments
Air_Surfac..ges_demo.zip
(18.17 KiB) Downloaded 31 times
Post Reply

Return to “Lua Legion”