Physics cannister: Difference between revisions
Jump to navigation
Jump to search
Bug:This entity exists in
, 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 ?]
Bug:This entity also exists in 

, also unused and with the default prop missing.
Confirm:is it just as glitchy there as in L4D2? [todo tested in ?]
Note:The model should have a
The thrust will be simulated along the Z axis, visualized as the blue line of the attachment in HLMV.
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
(-added class hierarchy, cleanup) |
||
Line 1: | Line 1: | ||
{{CD|CPhysicsCannister|file1=physics_cannister.cpp}} | |||
{{this is a|point entity|name=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. | {{this is a|point entity|name=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. | ||
[[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.]] | ||
Line 6: | Line 7: | ||
{{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.}} | ||
== Keyvalues == | == Keyvalues == | ||
{{KV|Explosion Damage|string|The amount of damage done by the explosion created when the canister blows up.}} | {{KV Targetname}} | ||
{{KV|Explosion Radius|string|The radius of the explosion to create when the canister blows up.}} | {{KV|Explosion Damage|intn=expdamage|string|The amount of damage done by the explosion created when the canister blows up.}} | ||
{{KV|Health|integer|The amount of damage the canister takes before exploding.}} | {{KV|Explosion Radius|intn=expradius|string|The radius of the explosion to create when the canister 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|Health|intn=health|integer|The amount of damage the canister takes before exploding.}} | ||
{{KV|Fuel Seconds|string|The amount of time that gas leaks from the canister before being considered empty.}} | {{KV|Thrust|intn=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|Smoke Color (R G B)|color255|Color of the smoke.}} | {{KV|Fuel Seconds|intn=fuel|string|The amount of time that gas leaks from the canister before being considered empty.}} | ||
{{KV|Smoke Alpha (0 - 255)|int 0-255|Transparency of the smoke.}} | {{KV|Smoke Color (R G B)|intn=rendercolor|color255|Color of the smoke.}} | ||
{{KV|Thruster Sound|sound|The sound played when the gas is escaping from the canister. | {{KV|Smoke Alpha (0 - 255)|intn=renderamt|int 0-255|Transparency of the smoke.}} | ||
{{KV|Thruster Sound|intn=gassound|sound|The sound played when the gas is escaping from the canister.}} | |||
== Flags == | == Flags == | ||
{{fl|1|[[Physics optimization|Start Asleep]]}} | {{fl|1|[[Physics optimization|Start Asleep]]}} | ||
{{fl|2|Explode}} | {{fl|2|Explode}} | ||
== Inputs == | == Inputs == | ||
Line 39: | Line 28: | ||
{{IO|Explode|Force the canister to explode.|param=string}} | {{IO|Explode|Force the canister to explode.|param=string}} | ||
{{IO|Wake|Wakes up the canister, if it is sleeping.}} | {{IO|Wake|Wakes up the canister, if it is sleeping.}} | ||
== Outputs == | == Outputs == | ||
{{IO|OnActivate|Fired when gas starts to escape from the canister.}} | {{IO|OnActivate|Fired when gas starts to escape from the canister.}} | ||
{{ | {{IO|OnAwakened|Fired when this entity becomes awake (collision/force is applied).}} | ||
Revision as of 06:13, 2 July 2024
![]() |
---|
CPhysicsCannister |
![]() |
physics_cannister
is a point entity available in all 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.








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.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Explosion Damage (expdamage) <string>
- The amount of damage done by the explosion created when the canister blows up.
- Explosion Radius (expradius) <string>
- The radius of the explosion to create when the canister blows up.
- Health (health) <integer>
- The amount of damage the canister takes before exploding.
- Thrust (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.
- Fuel Seconds (fuel) <string>
- The amount of time that gas leaks from the canister before being considered empty.
- Smoke Color (R G B) (rendercolor) <color255>
- Color of the smoke.
- Smoke Alpha (0 - 255) (renderamt) <integer 0–255>
- Transparency of the smoke.
- Thruster Sound (gassound) <sound>
- The sound played when the gas is escaping from the canister.
Flags
- Start Asleep : [1]
- Explode : [2]
Inputs
- Activate <string >
- Start gas escaping from the canister.
- Deactivate <string >
- Stop gas escaping from the canister.
- Explode <string >
- Force the canister to explode.
- Wake
- Wakes up the canister, if it is sleeping.
Outputs
- OnActivate
- Fired when gas starts to escape from the canister.
- OnAwakened
- Fired when this entity becomes awake (collision/force is applied).