Physics cannister: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added bug note. tested in l4d2 with a custom prop that i had made myself. Also, changed note abotu attachment origin. Further testing showed it was the Z axis, not X.)
m (updated template usage.)
Line 1: Line 1:
{{base point|physics_cannister}} It is a physically simulated gas cannister that can have its cap shot off, at which point gas will start escaping and cause the cannister to fly around. If it takes enough damage, it will explode.  
{{lang|Physics cannister}}
[[File:Physics cannister.png|thumb|200px|A fire extinguisher turned onto a physics_cannister by adding a <code>nozzle</code> atachment to the top. Thrust will be applied in the blue line.]]
{{point ent|physics_cannister}} 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.  
{{bug|This entity exists in {{l4d2}} but remains unused and no fitting prop for it exists. But it does work once a model is made. However, once the thrusting is done, it interacts glitchy when stood on. It pushes you off the cannister prop in unpredictable ways and the survivor bots keep melee bashing into it when stood close.}}
[[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.]]
{{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.}}
{{bug|This entity also exists in {{portal2series}}{{tf2}}{{csgo}}, also unused and with the default prop missing. {{confirm|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>
The thrust will be simulated along the Z axis, visualized as the blue line of the attachment in HLMV.}}
{{code class|CPhysicsCannister|physics_cannister.cpp}}
{{code class|CPhysicsCannister|physics_cannister.cpp}}
== Keyvalues ==
== Keyvalues ==
{{KV|World model|studio|The canister model.}}
{{KV|Explosion Damage|string|The amount of damage done by the explosion created when the canister blows up.}}
  {{Note| The model should have a <code>nozzle</code> attachment point, which is where gas will escape and thrust will be produced from.<br>
{{KV|Explosion Radius|string|The radius of the explosion to create when the canister blows up.}}
The thrust will be simulated along the Z axis. Visualized as the blue line of the attachment in HLMV.}}
{{KV|Health|integer|The amount of damage the canister takes before exploding.}}
{{KV|Explosion Damage|string|The amount of damage done by the explosion created when the cannister blows up.}}
{{KV|Thrust|string|When the cap has been blown off, and the escaping gas is thrusting the canister about, this is the amount of thrust generated.}}
{{KV|Explosion Radius|string|The radius of the explosion to create when the cannister blows up.}}
{{KV|Fuel Seconds|string|The amount of time that gas leaks from the canister before being considered empty.}}
{{KV|Health|integer|The amount of damage the cannister takes before exploding.}}
{{KV|Thrust|string|When the cap has been blown off, and the escaping gas is thrusting the cannister about, this is the amount of thrust generated.}}
{{KV|Fuel Seconds|string|The amount of time that gas leaks from the cannister before being considered empty.}}
{{KV|Smoke Color (R G B)|color255|Color of the smoke.}}
{{KV|Smoke Color (R G B)|color255|Color of the smoke.}}
{{KV|Smoke Alpha (0 - 255)|integer|Transparency of the smoke.}}
{{KV|Smoke Alpha (0 - 255)|int 0-255|Transparency of the smoke.}}
{{KV|Thruster Sound|sound|The sound played when the gas is escaping from the cannister.}}
{{KV|Thruster Sound|sound|The sound played when the gas is escaping from the canister.}}
{{KV Targetname}}
{{KV BaseEntity}}
{{KV Angles}}
{{KV BasePropPhysics|nofgd=1}}


== Flags ==
== Flags ==
* 1 : Start Asleep
{{fl|1|Start Asleep}}
* 2 : Explodes
{{fl|2|Explodes}}


== Inputs ==
== Inputs ==
{{IO|Activate|Start gas escaping from the cannister.|param=string}}
{{IO|Activate|Start gas escaping from the canister.|param=string}}
{{IO|Deactivate|Stop gas escaping from the cannister.|param=string}}
{{IO|Deactivate|Stop gas escaping from the canister.|param=string}}
{{IO|Explode|Force the cannister to explode.|param=string}}
{{IO|Explode|Force the canister to explode.|param=string}}
{{IO|Wake|Wakes up the cannister, if it is sleeping.}}
{{IO|Wake|Wakes up the canister, if it is sleeping.}}
{{I Targetname}}
{{I BaseEntity}}
{{I BaseAnimating|nofgd=1|portal2=1}}
{{I BasePropPhysics|nofgd=1}}


== Outputs ==
== Outputs ==
{{IO|OnActivate|Fired when gas starts to escape from the cannister.}}
{{IO|OnActivate|Fired when gas starts to escape from the canister.}}
{{IO|OnAwakened|Fired when this entity becomes awake (collision/force is applied).}}
{{IO|OnAwakened|Fired when this entity becomes awake (collision/force is applied).}}
{{O Targetname}}
{{O BaseEntity|l4d2=1}}
{{O BaseAnimating|portal2=1}}
{{O BasePropPhysics|portal2=1|l4d=1}}

Revision as of 11:00, 19 May 2022

English (en)Translate (Translate)

Template:Point ent 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.
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 Template:Portal2seriesTeam 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]
Explodes : [2]

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.
OnAwakened
Fired when this entity becomes awake (collision/force is applied).
Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history
Note.pngNote:Page left for viewable history, content moved to prop_physics