Skip to main content

ForcePulseCategory and ForcePulseTuning

A force pulse is the physical push of an explosion: it shoves objects, characters and vehicles away from its center. These tables are used when you spawn one yourself: ForcePulseTuning picks one of the game's built-in explosion tunings, and ForcePulseCategory picks the kind of explosion, which decides how strongly it pushes.

Available on: Client

Values​

Both tables are used by World.SpawnForcePulse(position, tuning, radius, category, velocity, pressure) (client). It returns a ForcePulse game object, which you set off with forcePulse:Explode(). The pulse only exists in the local game and is not synced to other players. radius is in meters.

ForcePulseCategory​

The kind of explosion. Every category except Manual uses the game's preset push strength for that kind of explosion, and the velocity and pressure arguments are not used. With Manual, the pulse uses the velocity and pressure you pass instead of a preset.

NameValueMeaning
ForcePulseCategory.Handgrenade0Pushes like a hand grenade.
ForcePulseCategory.FuelBarrel1Pushes like an exploding fuel barrel.
ForcePulseCategory.C42Pushes like C4 (planted explosives).
ForcePulseCategory.Vehicle3Pushes like an exploding vehicle.
ForcePulseCategory.FuelTruck4Pushes like an exploding fuel truck.
ForcePulseCategory.Manual-1Uses the velocity and pressure arguments instead of a preset.

ForcePulseTuning​

The game's built-in explosion tunings: the full catalog of force pulse settings that ship with the game. Each value is a 32-bit hash identifying one of them. The generic ones are named after their size; the others are the tunings the game uses for that weapon, vehicle or object.

NameValueMeaning
ForcePulseTuning.Generic05mNoDamage0x65F06325Generic pulse, 0.5 m, no damage.
ForcePulseTuning.Generic1m0x7D1B192DGeneric pulse, 1 m.
ForcePulseTuning.Generic1mHighDamage0x429A5BE3Generic pulse, 1 m, high damage.
ForcePulseTuning.Generic3m0x7C72DBACGeneric pulse, 3 m.
ForcePulseTuning.Generic5m0xCD1014C8Generic pulse, 5 m.
ForcePulseTuning.Generic5mNoDamage0x52A0D542Generic pulse, 5 m, no damage.
ForcePulseTuning.Generic8m0x0C7F628CGeneric pulse, 8 m.
ForcePulseTuning.Generic10m0x385471F7Generic pulse, 10 m.
ForcePulseTuning.Generic15m0x6095E7C3Generic pulse, 15 m.
ForcePulseTuning.Generic20m0x896CFFD5Generic pulse, 20 m.
ForcePulseTuning.GenericDamagePulse1m0xE3DD8F8CGeneric damage pulse, 1 m.
ForcePulseTuning.HandGrenade0x61878FBAA hand grenade explosion.
ForcePulseTuning.GrenadeLauncher0xA9778ADDA grenade launcher grenade.
ForcePulseTuning.ConcussionGrenade0xF7C59BA8A concussion grenade.
ForcePulseTuning.PlantedExplosive0xBB2CE1C5A planted explosive.
ForcePulseTuning.TurretPropulsion0x6399907CTurret propulsion blast.
ForcePulseTuning.W203AntiAir0x10E360A9The anti-air weapon (w203).
ForcePulseTuning.W304DeathDroppedGrenade0x03324F11The grenade an enemy drops when killed (w304).
ForcePulseTuning.DebugRpg0x72949518A rocket launcher rocket.
ForcePulseTuning.CarMedium0x8C9F685AA medium car exploding.
ForcePulseTuning.BikeMedium0x4772553BA medium motorbike exploding.
ForcePulseTuning.BoatMedium0x846954E6A medium boat exploding.
ForcePulseTuning.BoatLarge0xDEF0EEC0A large boat exploding.
ForcePulseTuning.HelicopterMedium0x3516F595A medium helicopter exploding.
ForcePulseTuning.AirplaneMedium0x2E5C99E0A medium airplane exploding.
ForcePulseTuning.TrainMedium0xC66D548CA medium train exploding.
ForcePulseTuning.Barrel0x758E107EAn explosive barrel.
ForcePulseTuning.FuelTank0x9D17A841A fuel tank.
ForcePulseTuning.FuelTankControlbox2m0x3FC6C088A fuel tank control box, 2 m.
ForcePulseTuning.FuelTankSpherical0x491A7075A spherical fuel tank.
ForcePulseTuning.SpringMine0x85CD095FA spring mine.
ForcePulseTuning.Lightning0x47971D51A lightning strike.
ForcePulseTuning.Retooler0x2ECF0027The retooler.

Example

-- client: push everything around the local player's aim point away, like a car exploding
Cmd.Add("blast", function()
local player = World.LocalPlayer()
if not player then
return
end

local position = player:AsPlayer():GetAimPosition()
local pulse = World.SpawnForcePulse(position, ForcePulseTuning.CarMedium, 10, ForcePulseCategory.Vehicle, 0, 0)

if pulse then
pulse:Explode()
end
end)

-- a custom, very strong push
Cmd.Add("bigpush", function()
local position = World.LocalPlayer():AsPlayer():GetAimPosition()
local pulse = World.SpawnForcePulse(position, ForcePulseTuning.Generic20m, 20, ForcePulseCategory.Manual, 60, 50)

if pulse then
pulse:Explode()
end
end)