Env explosion: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(updates. added a few video links to show the individual parts of the explosion)
Line 1: Line 1:
[[File:env_explosion.jpg|right|thumb|160px|The explosion in-game]]
{{lang|Env explosion}}
[[File:env_explosion.jpg|right|thumb|320px|The explosion in-game.]]
{{base point|env_explosion|sprite=1}} It creates an explosion at its origin.


{{base point|env_explosion|sprite=1}} It creates an explosion at its origin. To create an invisible explosion that moves objects within a radius, use [[env_physexplosion]].
{{code class|CEnvExplosion|explode.cpp}}
{{bug|This entity will not do damage if it is parented.}}


{{clearleft}}


== Keyvalues ==
==Flags==
{{KV|Magnitude|integer|The amount of damage done by the explosion.}}
*1: No Damage
{{KV|Radius Override|integer|If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude.}}
*2: Repeatable - Once the explosion has happened, the entity will not remove itself. Otherwise, it will be removed 0.3 seconds after the <code>Explode</code> input is sent (during that time it could possibly re-fire).
{{KV|Fireball Sprite|sprite|Sprite of the fireball.}}
*4: No [https://www.youtube.com/watch?v=wgLAkto0rzc Fireball]
{{KV|Render Mode|choices|Render mode of the fireball.}}
*<s>8: No Smoke</s> - No effect.
:* 0 : Normal
*16: No Decal - Black scorch decal left at the explosion center.
:* 4 : Solid
*<s>32: No Sparks</s> - No effect.
:* 5 : Additive
*64: No Sound
{{KV|Ignored Entity|target_destination|Do not harm or affect the named entity.}}
*128: Random Orientation
{{KV|Ignored Class|integer|Do not harm or affect this class.|since=L4D}}
*256: No [https://www.youtube.com/watch?v=BpupvIUX2uI Fireball Smoke] - Fireball smoke only spawns if the fireball itself can too.
{{KV Targetname}}
*512: No [https://www.youtube.com/watch?v=GB5fnGYuF6I Particles]
{{KV Parentname}}
*<s>1024: No DLights</s> - 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 <code>[[Damage_types#Damage_type_table|DMG_GENERIC]]</code> damage, as opposed to <code>DMG_BLAST</code>.


== Flags ==
==Keyvalues==
:* 1 : No Damage
{{KV|Magnitude (iMagnitude)|integer|The amount of damage done by the explosion.}}
:* 2 : Repeatable
{{KV|Radius Override (iRadiusOverride)|integer|If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude.}}
:* 4 : No Fireball
{{KV|Fireball Sprite (fireballsprite)|sprite|Sprite of the fireball.}}
:* 8 : No Smoke
{{KV|Render Mode (rendermode)|choices|[[Render mode]] of the fireball.
:* 16 : No Decal
:*0: Normal
:* 32 : No Sparks
:*4: Solid
:* 64 : No Sound
:*5: Additive}}
:* 128 : Random Orientation
{{KV|Ignored Entity (ignoredEntity)|target_destination|Do not harm or affect the named entity.}}
:* 256 : No Fireball Smoke
{{KV|Damage Force (DamageForce)|float|nofgd=1|{{todo|Uncertain. Setting to a non-zero number weakens forces on physics objects.}}}}
:* 512 : No particles
{{KV|Ignored Class (ignoredClass)|since=L4D|integer|Do not harm or affect this class. {{todo|...this ''classname''? How do you specify the class? Why does this take an integer?}}}}
:* 1024 : No DLights
{{KV BaseEntity|css=1}}
:* 2048 : Don't clamp Min
:* 4096 : Don't clamp Max
:* 8192 : Damage above surface only
:* 16384 : Generic damage


== Inputs ==
==Inputs==
{{IO|Explode|Triggers the explosion.}}
{{IO|Explode|Triggers the explosion.}}
{{I Targetname}}
{{I BaseEntity|prel4d=1}}
{{I Parentname}}


== Outputs ==
==Outputs==
{{O Targetname}}
{{O BaseEntity|l4d=1}}
 
==See Also==
*{{ent|env_physexplosion}}

Revision as of 10:14, 24 September 2018

English (en)中文 (zh)Translate (Translate)
The explosion in-game.

Template:Base point It creates an explosion at its origin.

C++ In code, it is represented by theCEnvExplosionclass, defined in theexplode.cppfile.

Flags

  • 1: No Damage
  • 2: Repeatable - Once the explosion has happened, the entity will not remove itself. Otherwise, it will be removed 0.3 seconds after the Explode input is sent (during that time it could possibly re-fire).
  • 4: No Fireball
  • 8: No Smoke - No effect.
  • 16: No Decal - Black scorch decal left at the explosion center.
  • 32: No Sparks - No effect.
  • 64: No Sound
  • 128: Random Orientation
  • 256: No Fireball Smoke - Fireball smoke only spawns if the fireball itself can too.
  • 512: No Particles
  • 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

Magnitude (iMagnitude) ([todo internal name (i)]) <integer>
The amount of damage done by the explosion.
Radius Override (iRadiusOverride) ([todo internal name (i)]) <integer>
If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude.
Fireball Sprite (fireballsprite) ([todo internal name (i)]) <sprite>
Sprite of the fireball.
Render Mode (rendermode) ([todo internal name (i)]) <choices>
Render mode of the fireball.
  • 0: Normal
  • 4: Solid
  • 5: Additive
Ignored Entity (ignoredEntity) ([todo internal name (i)]) <targetname>
Do not harm or affect the named entity.
Damage Force (DamageForce) ([todo internal name (i)]) <float> !FGD
Todo: Uncertain. Setting to a non-zero number weakens forces on physics objects.
Ignored Class (ignoredClass) ([todo internal name (i)]) <integer> (in all games since Left 4 Dead)
Do not harm or affect this class.
Todo: ...this classname? How do you specify the class? Why does this take an integer?


Inputs

Explode
Triggers the explosion.


Outputs

See Also