FANDOM


StartSubSystemWeaponConfig(<rSubSystem>, <sWeapon>, <sHardpoint>, <sAnimation>)

Description

StartSubSystemWeaponConfig is called within a .subs file, once per weapon mounted on the ship, although turrets with two barrels must only call this function once despite the turret effectively having two weapons. A subsystem may have more than one weapon fire from the same hardpoint and use the same or different animation. However, a subsystem should not have more than one weapon mounted in the same turret, as each weapon will attempt to control the rotation and elevation of the turret separately, often preventing all weapons from firing in that turret. Only weapons of the type Gimble or Fixed can safely fire from the same hardpoint (see the StartWeaponConfig function).

Example

StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_BattleCruiserTurretedIonCannon", "Weapon_IonCan1", "Weapon_IonCan1")

Arguments
1.<rShip> and <rSubSystem>: Reference to the ship or subsystem. Generally, this will be NewShipType or NewSubSystemType, respectively.
2.<sWeapon>: The weapon to be mounted in the indicated sHardpoint. The value corresponds to the base name of the .wepn file.
3.<sHardpoint>: The node on the model from where the weapon will fire, as coded in the ship's .hod file.
4.<sAnimation>: The name given to one of the animations defined in the ship's .events file. The animation provides the muzzle flash, sound of firing, and other special effects related to firing.

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.