Skip to content

Critical Reaction Warheads

BDCarrillo edited this page Mar 5, 2024 · 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.

Mimicking a warhead:

  • Set the CriticalReaction.Enable = true and CriticalReaction.TerminalControls = true. The TerminalControls option is what differentiates a normal weapon that explodes on destruction vs a discrete warhead that does not normally fire projectiles

  • Sample mod with warhead configs: https://steamcommunity.com/sharedfiles/filedetails/?id=3173625553

  • Note that under the hood, a phantom weapon is created and fired for these critical reactions/warhead explosions. The phantom is exactly the same as the block with the critical reaction/warhead explosion but cannot be interacted with by players. This means options like self damage or decay per shot will not produce any results, as they are applied to the phantom and not the original block.

  • The first round that is fired should have a life of 1 tick and is unlikely to produce any actual hits. It only exists to spawn fragments and provide AV via an EndOfLife custom particle. Typical AOE is unlikely to work with this first shot.

Clone this wiki locally