env_fire
env_fire
is a point entity available in all Source games. It handles a single flame (_firesmoke) at its origin. The flame causes heat "damage" to other env_fire
entities around it and will eventually ignite them, causing the fire to spread. env_firesource will add heat damage to nearby env_fire
entities and ignite them/maintain ignition.
Prior to the Orange Box, fire had a different effect made up of sprites generated dynamically through code instead of a particle system. The modern effects are defined in a PCF file, meaning they can be customized without code modifications, but they are far less dynamic than the classic effects, having only four premade sizes and no ability to set the attack/grow time through Hammer. All of Valve's games were updated or later shipped with only the particle-based fire effects, but the classic fire was eventually reimplemented as a setting in the Half-Life 2 20th Anniversary Update. Many of the settings on this entity were designed with only the classic fire in mind, so it is documented here.
Class hierarchy |
---|
CFire |
fire.cpp |
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Duration (health) <integer>
- Amount of time the fire will burn.
- Size (firesize) <integer>
- Height (in world units) of the flame.
35
or less: tiny36-71
: small72-107
: medium108
or greater: large
- Attack (fireattack) <integer>
- Amount of time the fire takes to grow to full strength.
- Type (firetype) <choices>
- Either Natural or Plasma. Natural is a general all purpose flame, like a wood fire.
- 0: Natural
- 1: Plasma Bug*:Doesn't work. Code for the plasma effect does exist in the SDK, however.
- Ignition Point (ignitionpoint) <float>
- Amount of heat 'damage' to take before this flame should ignite.
- Damage Scale (damagescale) <float>
- Multiplier of the burn damage done by the flame.
- Light Color (LightColor) <color255> (in all games since )
- Color of dynamic light for this fire.
- Light Radius Scale (LightRadiusScale) <float> (in all games since )
- Multiplier for the glow radius.
- Light Brightness (LightBrightness) <integer> (in all games since )
- Integer exponent for the glow brightness.
- Loop sound (LoopSound) <sound> (in all games since )
- Looping sound to play while this fire is burning.
- Ignite sound (IgniteSound) <sound> (in all games since )
- One shot sound to play when the fire starts.
Start Disabled (StartDisabled) <boolean>- Deprecated.
Stay dormant until activated. Doesn't work, use "start on" flag instead.
Flags
Infinite Duration : [1]
env_fire
cannot be extinguished with the fire extinguisher unless Infinite Duration is set.Smokeless : [2]
Start On : [4]
Start Full : [8]
Don't drop : [16]
No glow : [32]
Delete when out : [128]
Visible from above : [256] (removed since )
No sound : [256] (in all games since )
No ignite sound : [512] (in all games since )
No fueling once lit : [1024] (in all games since )
Fast burn think : [2048] (in all games since )
Inputs
- StartFire
- Start the fire.
- Extinguish <float>
- Puts out the fire permanently in the number of seconds specified.
- ExtinguishTemporary <float>
- Puts out the fire temporarily in the number of seconds specified.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- OnIgnited
- Fires when the fire is first ignited.
- OnExtinguished
- Fires when the fire is fully extinguished.
ConVars/Commands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
fire_maxabsorb | 50 | Arbitrary number (float) | Upper limit for how much heat "damage" a fire can take before the damage begins to force the flame to grow. Heat is usually absorbed from other env_fire s. |
fire_absorbrate | 3 | Multiplier (float) | Scalar for how fast fires can absorb heat. |
fire_extscale | 12 | Multiplier (float) | Effectively only a scalar for the Strength of an env_extinguisherjet. |
fire_extabsorb | 5 | Multiplier (float) | Todo: Effect description. |
fire_heatscale | 1.0 | Multiplier (float) | Scalar for how much damage a fire can do (both to fires and other objects such as the player). |
fire_incomingheatscale | 0.1 | Multiplier (float) | Scalar for how much heat a fire can take from other fires if it is already ignited. |
fire_dmgscale | 0.1 | Multiplier (float) | Todo: Effect description. |
fire_dmgbase | 1 | Health Amount | Base damage that a fire does to objects such as the player. This amount multiplies depending on the user's difficulty setting:
|
fire_growthrate | 1.0 | Multiplier (float) | Scalar for how much heat a fire can passively add to itself at once. Thinking interval is 0.1 seconds. |
fire_dmginterval | 1.0 | Seconds | Once a fire has damaged something, it will wait this long before it can damage anything again. |