This article's documentation is for anything that uses the Source engine. Click here for more information.

Env physexplosion: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
m (Substituted IO templates)
 
(50 intermediate revisions by 25 users not shown)
Line 1: Line 1:
env_physexplosion
{{LanguageBar}}
{{CD|CPhysExplosion|file1=physobj.cpp}}
{{this is a|point entity|name=env_physexplosion|sprite=1}}
It applies a physical force to physics objects within its radius, anything from a gentle nudge to a big explosion, depending on its magnitude. The explosion itself is not visible; for visible explosions, use {{ent|env_explosion}}.
{{toc-right}}
{{tip|Use this at a low force on hanging objects like lights or bodies to make them sway.}}


Point_Entity: Provides an explosion, which impairs all physical objects. If the NoDamage flag is activated, the explosion is invisible, and causes to only physical objects damage.
==Flags==
{{fl|1|No Damage|Only Force (Players are not ever damaged by the explosion (regardless of this flag), only objects.)}}
{{fl|2|Push players|}}
{{fl|4|Push radially|not as a sphere (Radially meaning as a circle/cylinder. No upward or downward force will be generated.)}}
{{fl|8|Test [[LOS]] before pushing|}}
{{fl|16|Disorient player if pushed|}}


Properties
==Keyvalues==
{{KV Targetname}}
{{KV|Magnitude|intn=magnitude|string|Amount of physics force applied by the explosion.
:{{note|The magnitude value is clamped between 1 and 100. If you require a bigger explosion than this, create multiple instances of the entity.}}}}
{{KV|Clamp Radius (0 {{=}} auto)|intn=radius|string|If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude.}}
{{KV|Limit to Entity|intn=targetentityname|target_destination|If specified, the explosion will only affect the matching entity.}}
{{KV|Inner radius|intn=inner_radius|float|If not zero, the [[LOS]] is calculated from a point intersecting this sphere.}}


    * Name - name of the Entity.
==Inputs==
    * Parent - name related Entity. Thus the Entity is bound to another, so that it along-moves.
{{I|Explode|Trigger the explosion.}}
    * Magnitude - standard: 100 - Strength of the explosion
{{I|ExplodeAndRemove|since=p2|Trigger the explosion, then remove the entity.}}
    * lamp radius (0 = car) - standard: 0 - Indicates the radius, in which physical objects are concerned. If the value is 0, after the radius the Magnitude one calculates automatically.
    * Limit ton of Entity - if indicated, the explosion is transferred only to this Entity.


Flag
==Outputs==
{{O|OnPushedPlayer|Fires when the player is pushed by the explosion.}}


    * NO Damage - standard: OFF - see above
[[Category:Physics]]
 
Input
 
    * Kill - the Entity removes
    * KillHierarchy - the Entity and all this removes �verwandten� Entities
    * ADD output - a new input/output adds being thing.
    * FireUser1 - triggers the output Onuser1.
    * FireUser2 - triggers the output Onuser2.
    * FireUser3 - triggers the output Onuser3.
    * FireUser4 - triggers the output Onuser4.
    * SetParent - related Entity (' Parent value) change
    * SetParentAttachment - if, places itself this Entity at one of these points has related Entity the Attachements.
    * ClearParent - the connection between the Entities removes, so that this Entity can move again freely.
    * Explode - the explosion releases.
 
Output
 
    * OnUser1 - by input FireUser1 one releases.
    * OnUser2 - by input FireUser2 one releases.
    * OnUser3 - by input FireUser3 one releases.
    * OnUser4 - by input FireUser4 one releases.
 
Remarks
 
None.
The use of all documents including the illustrations excluding for nichtkomerziellen purposes. Spreading of the document on storage media, (in particular on CD Rome as supplement to magazines and magazines or sucked. "mission luggage" etc..) is forbidden.

Latest revision as of 21:43, 19 April 2025

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CPhysExplosion
CPointEntity
CBaseEntity
C++ physobj.cpp
Env physexplosion.png

env_physexplosion is a point entity available in all Source Source games.

It applies a physical force to physics objects within its radius, anything from a gentle nudge to a big explosion, depending on its magnitude. The explosion itself is not visible; for visible explosions, use env_explosion.

Tip.pngTip:Use this at a low force on hanging objects like lights or bodies to make them sway.

Flags

No Damage : [1]
Only Force (Players are not ever damaged by the explosion (regardless of this flag), only objects.)
Push players : [2]
Push radially : [4]
not as a sphere (Radially meaning as a circle/cylinder. No upward or downward force will be generated.)
Test LOS before pushing : [8]
Disorient player if pushed : [16]

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Magnitude (magnitude) <string>
Amount of physics force applied by the explosion.
Note.pngNote:The magnitude value is clamped between 1 and 100. If you require a bigger explosion than this, create multiple instances of the entity.
Clamp Radius (0 = auto) (radius) <string>
If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude.
Limit to Entity (targetentityname) <targetname>
If specified, the explosion will only affect the matching entity.
Inner radius (inner_radius) <float>
If not zero, the LOS is calculated from a point intersecting this sphere.

Inputs

Explode
Trigger the explosion.
ExplodeAndRemove  (in all games since Portal 2)
Trigger the explosion, then remove the entity.

Outputs

OnPushedPlayer
Fires when the player is pushed by the explosion.