Physics cannister: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Cleanup)
Line 1: Line 1:
{{wrongtitle|title=physics_cannister}}
{{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.  
{{base_point}}
 
==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|class=class_c_physics_cannister.html CPhysicsCannister|file=physics__cannister_8cpp-source.html physics_cannister.cpp}}
{{in code|class=class_c_physics_cannister.html CPhysicsCannister|file=physics__cannister_8cpp-source.html physics_cannister.cpp}}


==Keyvalues==
== Keyvalues ==
*{{KV Targetname}}
{{KV|World model|studio|The canister model.}}
*{{KV Angles}}
{{KV|Explosion Damage|string|The amount of damage done by the explosion created when the cannister blows up.}}
*'''model'''
{{KV|Explosion Radius|string|The radius of the explosion to create when the cannister blows up.}}
:<studio> World model.
{{KV|Health|integer|The amount of damage the cannister takes before exploding.}}
*'''expdamage'''
{{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.}}
:<string> The amount of damage done by the explosion created when the cannister blows up.
{{KV|Fuel Seconds|string|The amount of time that gas leaks from the cannister before being considered empty.}}
*'''expradius'''
{{KV|Smoke Color (R G B)|color255|Color of the smoke.}}
:<string> The radius of the explosion to create when the cannister blows up.
{{KV|Smoke Alpha (0 - 255)|integer|Transparency of the smoke.}}
*'''health'''
{{KV|Thruster Sound|sound|The sound played when the gas is escaping from the cannister.}}
:<integer> The amount of damage the cannister takes before exploding.
{{KV Targetname}}
*'''thrust'''
{{KV Angles}}
:<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.


==Flags==
== Flags ==
*1 : Start Asleep
* 1 : Start Asleep
*2 : Explodes
* 2 : Explodes


==Inputs==
== Inputs ==
*{{I Targetname}}
{{IO|Activate|Start gas escaping from the cannister.|param=string}}
*'''Activate <string>'''
{{IO|Deactivate|Stop gas escaping from the cannister.|param=string}}
:Start gas escaping from the cannister.
{{IO|Explode|Force the cannister to explode.|param=string}}
*'''Deactivate <string>'''
{{IO|Wake|Wakes up the cannister, if it is sleeping.}}
:Stop gas escaping from the cannister.
{{I Targetname}}
*'''Explode <string>'''
:Force the cannister to explode.
*'''Wake'''
:Wakes up the cannister, if it is sleeping.


==Outputs==
== Outputs ==
*{{O Targetname}}
{{IO|OnActivate|Fired when gas starts to escape from the cannister.}}
*'''OnActivate'''
{{IO|OnAwakened|Fired when this entity becomes awake (collision/force is applied).}}
:Fired when gas starts to escape from the cannister. {{activator|activator}}
{{O Targetname}}
*'''OnAwakened'''
:Fired when this entity becomes awake (collision/force is applied).

Revision as of 15:46, 27 July 2011

Template:Base point 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.

Template:In code

Keyvalues

World model ([todo internal name (i)]) <model path>
The canister model.
Explosion Damage ([todo internal name (i)]) <string>
The amount of damage done by the explosion created when the cannister blows up.
Explosion Radius ([todo internal name (i)]) <string>
The radius of the explosion to create when the cannister blows up.
Health ([todo internal name (i)]) <integer>
The amount of damage the cannister takes before exploding.
Thrust ([todo internal name (i)]) <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 Seconds ([todo internal name (i)]) <string>
The amount of time that gas leaks from the cannister 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>
Transparency of the smoke.
Thruster Sound ([todo internal name (i)]) <sound>
The sound played when the gas is escaping from the cannister.
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

Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Flags

  • 1 : Start Asleep
  • 2 : Explodes

Inputs

Activate <stringRedirectInput/string>
Start gas escaping from the cannister.
Deactivate <stringRedirectInput/string>
Stop gas escaping from the cannister.
Explode <stringRedirectInput/string>
Force the cannister to explode.
Wake
Wakes up the cannister, if it is sleeping.


Outputs

OnActivate
Fired when gas starts to escape from the cannister.
OnAwakened
Fired when this entity becomes awake (collision/force is applied).