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

Physics cannister: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Updated old entity format to {{this is a}}. This action was perfomed by a bot.)
m (→‎top: clean up, replaced: {{ModernBug → {{bug (2))
Line 2: Line 2:
[[File:Physics cannister.png|thumb|200px|A fire extinguisher turned into a <code>physics_cannister</code> by adding a <code>nozzle</code> attachment to the top. Thrust will be applied along the blue line.]]
[[File:Physics cannister.png|thumb|200px|A fire extinguisher turned into a <code>physics_cannister</code> by adding a <code>nozzle</code> attachment to the top. Thrust will be applied along the blue line.]]
[[File:Physics Cannister in Half-Life 2.gif|thumb|right|A gif of a physics cannister (in an official Half-Life 2 map) having its cap shot off and flying into a wall, then it being shot again causing it to explode.]]
[[File:Physics Cannister in Half-Life 2.gif|thumb|right|A gif of a physics cannister (in an official Half-Life 2 map) having its cap shot off and flying into a wall, then it being shot again causing it to explode.]]
{{ModernBug|This entity exists in {{l4d2}}, but it remains unused and no fitting prop for it exists. It works if a model is added; however, once the thrusting is finished, it interacts glitchily when stood on. It pushes you off the canister prop in unpredictable ways, and the survivor bots keep melee bashing into it when standing nearby.}}
{{bug|This entity exists in {{l4d2}}, but it remains unused and no fitting prop for it exists. It works if a model is added; however, once the thrusting is finished, it interacts glitchily when stood on. It pushes you off the canister prop in unpredictable ways, and the survivor bots keep melee bashing into it when standing nearby.}}
{{ModernBug|This entity also exists in {{portalseries}}{{tf2}}{{csgo}}, also unused and with the default prop missing. {{ModernConfirm|is it just as glitchy there as in L4D2?}}}}
{{bug|This entity also exists in {{portalseries}}{{tf2}}{{csgo}}, also unused and with the default prop missing. {{ModernConfirm|is it just as glitchy there as in L4D2?}}}}
{{Note|The model should have a <code>nozzle</code> attachment point, which is where gas will escape and thrust will be produced from.<br>
{{Note|The model should have a <code>nozzle</code> attachment point, which is where gas will escape and thrust will be produced from.<br>
The thrust will be simulated along the Z axis, visualized as the blue line of the attachment in HLMV.}}
The thrust will be simulated along the Z axis, visualized as the blue line of the attachment in HLMV.}}

Revision as of 11:45, 6 January 2024

physics_cannister is an e0 available in all Source Source games. It is a physically simulated gas canister (with a misspelled entity name) that can have its cap shot off, at which point gas will start escaping, causing the canister to fly around. If it takes enough damage, it will explode.

A fire extinguisher turned into a physics_cannister by adding a nozzle attachment to the top. Thrust will be applied along the blue line.
A gif of a physics cannister (in an official Half-Life 2 map) having its cap shot off and flying into a wall, then it being shot again causing it to explode.
Icon-Bug.pngBug:This entity exists in Left 4 Dead 2, but it remains unused and no fitting prop for it exists. It works if a model is added; however, once the thrusting is finished, it interacts glitchily when stood on. It pushes you off the canister prop in unpredictable ways, and the survivor bots keep melee bashing into it when standing nearby.  [todo tested in ?]
Icon-Bug.pngBug:This entity also exists in Portal seriesTeam Fortress 2Counter-Strike: Global Offensive, also unused and with the default prop missing.
Confirm:is it just as glitchy there as in L4D2?
  [todo tested in ?]
Note.pngNote:The model should have a nozzle attachment point, which is where gas will escape and thrust will be produced from.
The thrust will be simulated along the Z axis, visualized as the blue line of the attachment in HLMV.
C++ In code, it is represented by theCPhysicsCannisterclass, defined in thephysics_cannister.cppfile.

Keyvalues

Explosion Damage ([todo internal name (i)]) <string>
The amount of damage done by the explosion created when the canister blows up.
Explosion Radius ([todo internal name (i)]) <string>
The radius of the explosion to create when the canister blows up.
Health ([todo internal name (i)]) <integer>
The amount of damage the canister takes before exploding.
Thrust ([todo internal name (i)]) <string>
When the cap has been blown off, and the escaping gas is thrusting the canister about, this is the amount of thrust generated.
Fuel Seconds ([todo internal name (i)]) <string>
The amount of time that gas leaks from the canister before being considered empty.
Smoke Color (R G B) ([todo internal name (i)]) <color255>
Color of the smoke.
Smoke Alpha (0 - 255) ([todo internal name (i)]) <integer 0–255>
Transparency of the smoke.
Thruster Sound ([todo internal name (i)]) <sound>
The sound played when the gas is escaping from the canister.
Note.pngNote:Page left for viewable history, content moved to prop_physics

Flags

Start Asleep : [1]
Explode : [2]
Debris : [4] !FGD
Don't collide with the player or other debris.
Motion Disabled : [8] !FGD
Starts with motion disabled until sent EnableMotion.
Enable motion when grabbed by gravity gun : [64] !FGD
Not affected by rotor wash : [128] !FGD
Generate output on +use : [256] !FGD
Prevent pickup : [512] !FGD
Prevent motion enable on player bump. : [1024] !FGD
Debris with trigger interaction. : [4096] !FGD
Force server-side : [8192] !FGD
Multiplayer only; see sv_pushaway_clientside_size.
Gravity gun can ALWAYS pick up. No matter what. : [1048576] !FGD

BreakableProp:

Break on Touch : [16]
Break on Pressure : [32]
Will break after being stood on for PressureDelay seconds.
Note.pngNote:Some models will break instantly if this is or isn't set. (e.g. militiawindow02_breakable.mdl, window_industrial.mdl)

Inputs

Activate <stringRedirectInput/string>
Start gas escaping from the canister.
Deactivate <stringRedirectInput/string>
Stop gas escaping from the canister.
Explode <stringRedirectInput/string>
Force the canister to explode.
Wake
Wakes up the canister, if it is sleeping.
Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history
Note.pngNote:Page left for viewable history, content moved to prop_physics

Outputs

OnActivate
Fired when gas starts to escape from the canister.
Note.pngNote:Page left for viewable history, content moved to prop_physics