env_explosion

From Source Entities
Jump to navigation Jump to search

Code classes:

Env explosion.png

env_explosion is a point entity present in all Source games. It creates an explosion at its origin.

Flags[edit | edit source]

  • 1: No Damage
  • 2: Repeatable - Once the explosion has happened, the entity will not remove itself.
  • 8: No Smoke - No effect.
  • 16: No Decal - Black scorch decal left at the explosion center.
  • 32: No Sparks (env_explosion normally makes a spark effect but only when underwater, due to a code typo).
  • 64: No Sound
  • 128: Random Orientation - Applies more randomness to the orientations of sprites. Virtually impossible to see the difference.
  • 256: No Fireball Smoke - Fireball smoke only spawns if the fireball itself can too.
  • 1024: No DLights - No effect.
  • 2048: Don't clamp Min - Allow much smaller fire sprites.
  • 4096: Don't clamp Max - Allow much larger fire sprites.
  • 8192: Damage above surface only - Don't do damage to the player if they are underwater.
  • 16384: Generic damage - Do DMG_GENERIC damage, as opposed to DMG_BLAST.

Keyvalues[edit | edit source]

Magnitude (iMagnitude) <integer>
The amount of damage done by the explosion.
Radius Override (iRadiusOverride) <integer>
If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude.
Damage Force (Not in FGD) (DamageForce) <float>
Overrides push force. Bug: Very obvious disparity between force applied to players and force applied to physics objects.
Fireball Sprite (fireballsprite) <sprite>
Ignored.
Render Mode (rendermode) <choices>
No visible effect.
Ignored Entity (ignoredEntity) <target_destination>
Does not work.
Ignored Class (Not in FGD) (ignoredClass) <integer>
Does not work.

Inputs[edit | edit source]

Explode
Makes the explosion happen. If Repeatable is not ticked, the entity will remove itself shortly after the explosion.
Bug: If this input is sent very rapidly, the explosion may occur multiple times, or possibly infinitely due to the entity not removing itself fast enough. This delay is probably to avoid errors involved with attributing damage/kills to the explosion.
Fix: Kill the entity as soon as possible or otherwise prevent the input from sending.

See Also[edit | edit source]