Function; AddMagneticField - HWRM/KarosGraveyard GitHub Wiki

addMagneticField(<rShipTable>,<sFieldType>,<iRadius>,<iMissilePassPercent>,<sMissileBlockEffect>,<iBulletBlockPercent>,<iBulletPassPercent>,<sBulletBlockEffect>,<iInstantPassPercent>,<sInstantBlockEffect>,<sFieldEffect>)

Description

Adds a field of <sFieldType> to a ship.

Example

addMagneticField(NewShipType,"MagneticField",1000,99,"defenseField_generic",15,"defenseField_generic",99,"plasma_hit_spray_MagneticField","defensefield_sphere_spray_TFF");

Arguments

<rShipTable>: Reference to the ship; this should be NewShipType.
<sFieldType>: The type of field; only "MagneticField" seems available.
<iRadius>: Radius (in meters?) (from ship origin?) of field effect.
<iMissilePassPercent>: Percentage of missiles not blocked by field effect.
<sMissileBlockEffect>: Reference to FX played when missile is blocked.
<iBulletPassPercent>: Percentage of bullets not blocked by field effect.
<sBulletBlockEffect>: Reference to FX played when bullet is blocked.
<iInstantPassPercent>: Percentage of instant hit weapons not blocked by field effect.
<sInstantBlockEffect>: Reference to FX played when instant hit weapon is blocked. <sFieldEffect>: Reference to FX played when MagneticField is active.

Scope

Related Pages

Comments

Keep in mind the numbers supplied indicate the amount of weapon fire that should pass through the magnetic field, and not the percentage blocked. That is, given a value of 100, 100% of weapon fire will pass through.

Page Status

Updated Formatting? Yes
Updated for HWRM? Yes

⚠️ **GitHub.com Fallback** ⚠️