Skip to content

Function; SobGroup_CreateShip

Novaras edited this page Aug 27, 2023 · 7 revisions

SobGroup_CreateShip(<target_group>, <ship_type>)

Description

Creates a ship_type in target_group.

The ship will exit the shiphold or hyperspace in, depending on its normal build behavior, as set in ship tuning. Ships with buildBatch will come in thier usual squad sizes.

💡 Importantly, this function only works if target_group contains a ship with a shiphold. In the case where a shiphold is present, but can't accomodate the type of ship(s) being spawned, the ship will simply appear instantly in the next available default parade position.

Note: if the sobgroup doesn't contain a builder, use SobGroup_SpawnNewShipInSobGroup instead.

Example

SobGroup_CreateShip("Player_Ships0", "vgr_lasercorvette")

This would add a Vaygr Laser corvette to the first player in the game (player 0).

Arguments

Param Type Description
target_group string The name of a SobGroup. The group should contain a ship with a shiphold. Otherwise, try using SobGroup_SpawnNewShipInSobGroup.
ship_type string The type of ship to spawn. The ship will come out of the shiphold, or hyperspace in. The normal squad sizes will appear.

Related Pages

Clone this wiki locally