env_headcrabcanister
| CEnvHeadcrabCanister |
env_headcrabcanister is a model entity available in
Half-Life 2 series,
Source 2006,
Source 2013, and
Portal. The canister is a mortar shell containing a payload of headcrabs. The mortar shell inflicts damage within a radius of where it lands and releases headcrabs after impact. Inputs and keyvalues offer control over impact damage and when the headcrabs are released, among other options.
For an example of their use, see the shantytown in d1_canals_05.
Flags
- No Impact Sound : [1]
- No Launch Sound : [2]
- Start Impacted : [4096]
- Land at initial position : [8192]
- Wait for input to open : [16384]
- Wait for input to spawn headcrabs : [32768]
- No smoke : [65536]
- No shake : [131072]
- Remove on impact : [262144]
- No impact effects : [524288]
Keyvalues
parentname or target).Also displayed in Hammer's 2D views and Entity Report.
Which headcrab to Spawn? (HeadcrabType) <choices>
- 0: Normal headcrabs
- 1: Fast Headcrabs
- 2: Poison Headcrabs
Headcrab count (HeadcrabCount) <integer>
Min Refire time (MinSkyboxRefireTime) <float>
Max Refire time (MaxSkyboxRefireTime) <float>
Canister count (SkyboxCannisterCount) <integer>
Impact damage (Damage) <float>
Impact damage Radius (DamageRadius) <float>
Smoke duration (SmokeLifetime) <float>
Launch Position Name (LaunchPositionName) <targetname>
Flight Speed (FlightSpeed) <float>
Flight Time (FlightTime) <float>
Starting Height (StartingHeight) <float>
Inputs
- FireCanister <void>
- Fires the canister.
- OpenCanister <void>
- Opens the canister (must be called after the
OnImpactedoutput is fired).
- SpawnHeadcrabs <void>
- Spawns headcrabs (must be called after the
OnImpactedoutput is fired and afterOpenCanisteris triggered, if the Wait for Input to open' flag is checked).)
- StopSmoke <void>
- Causes the smoke effect to stop.
Outputs
- OnLaunched <targetname*>
- !activator = !caller = this entity
Fired when the canister is launched. This output automatically puts the targetname of the canister into the parameter box for inputs, if the mapper does not override the parameter with something else.
- OnImpacted <void>
- !activator = !caller = this entity
Fires when canister hits the ground.
- OnOpened <void>
- !activator = !caller = this entity
Fires when canister has finished opening.
ConVars/Commands
| Cvar/Command | Parameters or default value | Descriptor | Effect |
|---|---|---|---|
| sk_env_headcrabcanister_shake_amplitude | 50 | Arbitrary decimal (float) | Crash effect's shake amplitude. Though the default is 50, the shake amplitude can only go up to 16. |
| sk_env_headcrabcanister_shake_radius | 1024 | Hammer units | Radius the player must be within for the screen shake effect to occur. Shake amplitude is gradually decreased the farther away from the explosion the player is. |
| sk_env_headcrabcanister_shake_radius_vehicle | 2500 | Hammer units | As above, but when in a vehicle. |
