Physics cannister
From Valve Developer Community
This point-based entity is available in all Source games.
| Table of contents |
[edit]
Entity Description
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.
In code it is represented by class CPhysicsCannister (http://doxygen.page.needed/class_c_physics_cannister.html), defined in physics_cannister.cpp (http://doxygen.page.needed/physics__cannister_8cpp-source.html).
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- Pitch Yaw Roll (Y Z X)
- This entity's angular orientation in the world (also used for angular effect entities).
- model
- <studio> World model.
- expdamage
- <string> The amount of damage done by the explosion created when the cannister blows up.
- expradius
- <string> The radius of the explosion to create when the cannister blows up.
- health
- <integer> The amount of damage the cannister takes before exploding.
- 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.
- fuel
- <string> The amount of time that gas leaks from the cannister before being considered empty.
- rendercolor
- <color255> Smoke Color (R G B).
- renderamt
- <integer> Smoke Alpha (0 - 255).
- gassound
- <sound> The sound played when the gas is escaping from the cannister.
[edit]
Flags
- 1 : Start Asleep
- 2 : Explodes
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- Activate <string>
- Start gas escaping from the cannister.
- Deactivate <string>
- Stop gas escaping from the cannister.
- Explode <string>
- Force the cannister to explode.
- Wake
- Wakes up the cannister, if it is sleeping.
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
- OnActivate
- Fired when gas starts to escape from the cannister.
- !activator = activator
