Env fire: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(updates)
Line 1: Line 1:
{{otherlang2
{{lang|Env fire}}
|ru=Env fire:ru
[[File:env_fire.jpg|thumb|400px|right|Example of <code>env_fire</code>.]]
|zh-cn=Env_fire:zh-cn
[[File:env_fire.png|left|link=]]{{base point|env_fire}} It handles a single flame ({{ent|_firesmoke}}) at its [[origin]]. The flame causes heat "damage" to other <code>env_fire</code> entities around it, and will eventually ignite them, causing the fire to spread.
}}


[[File:env_fire.jpg|thumb|250px|right|Example of env_fire]]
{{note|The fire may fall through the world on spawn if placed exactly at ground level. Place it a little bit above the ground to fix this.}}
 
{{bug|This entity doesn't work in [[Portal]]. Please see [[Portal:Env Fire fix]] for more details}}


{{base point|env_fire}}
{{bug|While still available, it does not have particle effects in [[Team Fortress 2]]. [[TF2/Creating_fire|This method]] is recommended instead.}}


==Entity description==
{{code class|CFire|fire.cpp}}
[[File:env_fire.png|left|link=]]
It handles a single flame at its [[origin]]. The flame causes heat 'damage' to other '''env_fire''' entities around it, and will eventually ignite non-flaming env_fire entities nearby, causing the fire to spread.
{{clr-left}}


{{note|This entity doesn't create a lighting effect of any sort, you have to use a flickering [[light]] for that.}}
==ConVars/Commands==
{{note|The fire may fall through the world on spawn if placed exactly at ground level. Place it a little bit above the ground to fix this.}}
{{varcom|start}}
{{bug|This entity doesn't work in [[Portal]]. Please see [[Portal:Env_Fire_fix]] for more details}}
{{varcom|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 <code>env_fire</code>s.}}
{{bug|While still available, it does not have particle effects in [[Team Fortress 2]]. [[TF2/Creating_fire|This method]] is recommended instead.}}
{{varcom|fire_absorbrate|3|Multiplier ([[float]])|Scalar for how fast fires can absorb heat.}}
{{bug|While still available, it does not currently work correctly in your Source 2007 based mod until you build(/rebuild) the project.}}
{{varcom|fire_extscale|12|Multiplier ([[float]])|Effectively only a scalar for the '''Strength''' of an {{ent|env_extinguisherjet}}.}}
{{bug|Plasma fire is invisible.}}
{{varcom|fire_extabsorb|5|Multiplier ([[float]])}}
{{varcom|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).}}
{{varcom|fire_incomingheatscale|0.1|Multiplier ([[float]])|Scalar for how much heat a fire can take from other fires if it is already ignited.}}
{{varcom|fire_dmgscale|0.1|Multiplier ([[float]])}}
{{varcom|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:{{skill|x1|x2|x3}}}}
{{varcom|fire_growthrate|1.0|Multiplier ([[float]])|Scalar for how much heat a fire can passively add to itself at once. [[Think]]ing interval is 0.1 seconds.}}
{{varcom|fire_dmginterval|1.0|Seconds|Once a fire has damaged something, it will wait this long before it can damage anything again.}}
{{varcom|end}}


==Flags==
*1: Infinite Duration
{{note|In Alien Swarm, an <code>env_fire</code> cannot be extinguished with the fire extinguisher unless ''Infinite Duration'' is set.}}
*2: Smokeless
*4: Start On
*8: Start Full
*16: Don't drop
*32: No glow
*128: Delete when out
*256: Visible from above
*256: No sound {{AS add}}
*512: No ignite sound {{AS add}}
*1024: No fueling once lit {{AS add}}
*2048: Fast burn think {{AS add}}


==Keyvalues==
==Keyvalues==
{{KV|Duration|integer|Amount of time the fire will burn.}}
{{KV|Duration (health)|integer|Amount of time the fire will burn.}}
{{KV|Size|integer|Height (in world units) of the flame.}}
{{KV|Size (firesize)|integer|Height (in world units) of the flame.}}
{{KV|Attack|integer|Amount of time the fire takes to grow to full strength.}}
{{KV|Attack (fireattack)|integer|Amount of time the fire takes to grow to full strength.}}
{{KV|Type|choices|Either Natural or Plasma. Natural is a general all purpose flame, like a wood fire.}}
{{KV|Type (firetype)|choices|Either Natural or Plasma. Natural is a general all purpose flame, like a wood fire.
:* 0 : Natural
:*0: Natural
:* 1 : Plasma
:*1: Plasma (Effects for this type do not exist!)}}
{{KV|Ignition Point|float|Amount of heat 'damage' to take before this flame should ignite.}}
{{KV|Ignition Point (ignitionpoint)|float|Amount of heat 'damage' to take before this flame should ignite.}}
{{KV|Damage Scale|float|Multiplier of the burn damage done by the flame.}}
{{KV|Damage Scale (damagescale)|float|Multiplier of the burn damage done by the flame.}}
{{KV Targetname}}
{{KV|Light Color (LightColor)|since=AS|color255|Color of dynamic light for this fire.}}
{{KV Parentname}}
{{KV|Light Radius Scale (LightRadiusScale)|since=AS|float|Multiplier for the glow radius.}}
{{KV|Light Brightness (LightBrightness)|since=AS|integer|Integer exponent for the glow brightness.}}
{{KV|Loop sound (LoopSound)|since=AS|sound|Looping sound to play while this fire is burning.}}
{{KV|Ignite sound (IgniteSound)|since=AS|sound|One shot sound to play when the fire starts.}}
{{KV EnableDisable}}
{{KV EnableDisable}}
 
{{KV BaseEntity|css=1}}
==Flags==
* 1 : Infinite Duration
* 2 : Smokeless
* 4 : Start On
* 8 : Start Full
* 16 : Don't drop
* 32 : No glow
* 128 : Delete when out
* 256 : Visible from above
{{note| In Alien Swarm, an env_fire entity cannot be extinguished by the player unless set to "Infinite Duration".}}


==Inputs==
==Inputs==
{{IO|StartFire|Start the fire.}}
{{IO|StartFire|Start the fire.}}
{{IO|Extinguish|Puts out the fire permanently in the number of seconds specified.|param=float}}
{{IO|Extinguish|param=float|Puts out the fire permanently in the number of seconds specified.}}
{{IO|ExtinguishTemporary|Puts out the fire temporarily in the number of seconds specified.|param=float}}
{{IO|ExtinguishTemporary|param=float|Puts out the fire temporarily in the number of seconds specified.}}
{{I Targetname}}
{{I Parentname}}
{{I EnableDisable}}
{{I EnableDisable}}
{{I BaseEntity|prel4d=1}}


==Outputs==
==Outputs==
{{IO|OnIgnited|Fires when the fire is first ignited.}}
{{IO|OnIgnited|Fires when the fire is first ignited.}}
{{IO|OnExtinguished|Fires when the fire is fully extinguished.}}
{{IO|OnExtinguished|Fires when the fire is fully extinguished.}}
{{O Targetname}}
{{O BaseEntity|l4d=1}}


[[Category:Special effects]]
[[Category:Special effects]]

Revision as of 16:31, 24 September 2018

English (en)中文 (zh)Translate (Translate)
Example of env_fire.
Env fire.png

Template:Base point 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.

Note.pngNote:The fire may fall through the world on spawn if placed exactly at ground level. Place it a little bit above the ground to fix this.
Icon-Bug.pngBug:This entity doesn't work in Portal. Please see Portal:Env Fire fix for more details  [todo tested in ?]
Icon-Bug.pngBug:While still available, it does not have particle effects in Team Fortress 2. This method is recommended instead.  [todo tested in ?]
C++ In code, it is represented by theCFireclass, defined in thefire.cppfile.

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_fires.
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:
  • Easy: x1
  • Normal: x2
  • Hard: x3
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.

Flags

  • 1: Infinite Duration
Note.pngNote:In Alien Swarm, an env_fire cannot be extinguished with the fire extinguisher unless Infinite Duration is set.

Keyvalues

Duration (health) ([todo internal name (i)]) <integer>
Amount of time the fire will burn.
Size (firesize) ([todo internal name (i)]) <integer>
Height (in world units) of the flame.
Attack (fireattack) ([todo internal name (i)]) <integer>
Amount of time the fire takes to grow to full strength.
Type (firetype) ([todo internal name (i)]) <choices>
Either Natural or Plasma. Natural is a general all purpose flame, like a wood fire.
  • 0: Natural
  • 1: Plasma (Effects for this type do not exist!)
Ignition Point (ignitionpoint) ([todo internal name (i)]) <float>
Amount of heat 'damage' to take before this flame should ignite.
Damage Scale (damagescale) ([todo internal name (i)]) <float>
Multiplier of the burn damage done by the flame.
Light Color (LightColor) ([todo internal name (i)]) <color255> (in all games since Alien Swarm)
Color of dynamic light for this fire.
Light Radius Scale (LightRadiusScale) ([todo internal name (i)]) <float> (in all games since Alien Swarm)
Multiplier for the glow radius.
Light Brightness (LightBrightness) ([todo internal name (i)]) <integer> (in all games since Alien Swarm)
Integer exponent for the glow brightness.
Loop sound (LoopSound) ([todo internal name (i)]) <sound> (in all games since Alien Swarm)
Looping sound to play while this fire is burning.
Ignite sound (IgniteSound) ([todo internal name (i)]) <sound> (in all games since Alien Swarm)
One shot sound to play when the fire starts.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Inputs

StartFire
Start the fire.
Extinguish <floatRedirectInput/float>
Puts out the fire permanently in the number of seconds specified.
ExtinguishTemporary <floatRedirectInput/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.