FANDOM



Player_FillShipsByType(<sSobGroupNameOut>, <iPlayerIndex>, <sShipType>)
Description
Fills <sSobGroupNameOut> with only those ships of type <sShipType> that are active and belong to <iPlayerIndex>.
Example (from the HW Classic Mod)
Player_FillShipsByType("CrateMothership", 0, "Vgr_Mothership")
Arguments
<sSobGroupNameOut>: the name of the sobgroup to place ships into.
<iPlayerIndex>: the index number of the player.
<sShipType>: the type of ship.
Notes
Inactive ships (e.g., ships that are in hyperspace or docked) are ignored by this function. Use Player_GetNumberOfSquadronsOfTypeAwakeOrSleeping to count the number of ships, regardless of whether they are active or inactive.
The sobgroup is cleared each time the function is called: i.e., the sobgroup is emptied before being filled again with all ships of <sShipType>.
<sSobGroupNameOut> must be created before the function is called.
Related Pages

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.