Skip to content
EvilEngine.Api.Weapons

WeaponBlast record

public sealed record WeaponBlast

An explosion a projectile sets off through IProjectile.Explode. Its damage falls off in a line to nothing at its radius, measured to the nearest point the blast can see on each prop and person. A prop between the blast and something behind it takes a share of the damage by its mass, all of it at 350 kg, and the world blocks it. Everything it hurts is pushed away from the blast; the one it hit takes all of the damage.

Assembly
EvilEngine.Api
Commit
4ff877b1

Members

WeaponBlast constructor

public WeaponBlast(double Damage, double Radius)

The damage at its centre and its radius in meters.

Damage property

public double Damage { get; init; }

The damage at the centre.

Radius property

public double Radius { get; init; }

How far it reaches, in meters.

Force property

public double Force { get; init; }

The push each point of damage gives, in kg·m/s, 300 units’ worth by default.

MostForce property

public double MostForce { get; init; }

The most push it gives anything, in kg·m/s, 30,000 units’ worth by default.

Jitter property

public double Jitter { get; init; }

How much each push varies either way, 0.15 for up to 15%.

Sound property

public ContentId? Sound { get; init; }

The sound it makes, if any.

Glow property

public ProjectileGlow? Glow { get; init; }

The colour its flash draws in, or null for fire.

Decal property

public ContentId? Decal { get; init; }

A decal record, a scorch, left where a line straight down from the blast meets the world, or null for none.

DecalReach property

public double DecalReach { get; init; }

How far down that line reaches, in metres: 24 Source units by default, where Garry’s Mod’s frag grenade stops scorching the floor.