From Elite Wiki
ShipGroup class is used to manage groups of ships.
new ShipGroup([name : String [, leader :
Ship]]) : ShipGroup
Creates a new group, optionally specifying the
var myGroup = new ShipGroup(); myGroup.name = "My group"; myShip.group = myGroup;
count : Number (integer, read-only)
Number of ships in the group, including leader.
leader : Ship (read/write)
Defines a leader for the group. If the ship is not a member of the group, it is added. Note: The player's ship can be set as a group leader, but doing this is not recommended. The lack of JS AIs for the player means that exceptions during script execution and other unpredictable behaviour can be expected and, are in fact, very likely. This is a known issue in versions of the game up to and including 1.84.
name : String (read/write)
Name of the ship group.
ships : Array (Ships, read-only)
function addShip(ship : Ship)
Add a ship to the group.
function containsShip(ship : Ship) : Boolean
ship is a member of the group,
function removeShip(ship : Ship)
Remove a ship from the group.