Skip to content

Critical Reaction Warheads

BDCarrillo edited this page Aug 13, 2023 · 8 revisions

Critical Reactions:

Critical reactions are a way to setup a projectile that spawns when a weapon is destroyed. This can also be used to mimic warheads, with an arm/trigger/countdown system.

  • To mimic a warhead, set the following properties in the ammo:
AmmoMagazine = "Energy",
Shape.Shape = SphereShape, 
Shape.Diameter = 30, // match the EOL radius
EndOfLife.ArmOnlyOnHit = false,
Beams.Enable = true,
Trajectory.MaxLifeTime = 1,
Trajectory.DesiredSpeed = 0,
  • In the weapon config, enable Critical Reaction and set the ammo type. Ensure the reload time is set to zero on the weapon.
CriticalReaction = new CriticalDef
{
 Enable = true, // Enables Warhead behaviour.
 DefaultArmedTimer = 0, // Sets default countdown duration.
 PreArmed = false, // Whether the warhead is armed by default when placed. Best left as false.
 TerminalControls = true, // Whether the warhead should have terminal controls for arming and detonation.
 AmmoRound = "ammoround", // Optional. If specified, the warhead will always use this ammo on detonation rather than the currently selected ammo.
},
Clone this wiki locally