Env headcrabcanister: Difference between revisions
Jump to navigation
Jump to search

m (Substituted IO templates) |
(not in source sdk base 2007 so specified 6 and 13 idk) |
||
Line 3: | Line 3: | ||
{{CD|CEnvHeadcrabCanister|file1=env_headcrabcanister.cpp}} | {{CD|CEnvHeadcrabCanister|file1=env_headcrabcanister.cpp}} | ||
[[File:Headcrabcanister.jpg|frame|right]] | [[File:Headcrabcanister.jpg|frame|right]] | ||
{{this is a|point entity|name=env_headcrabcanister|game=Half-Life 2|game1= | {{this is a|point entity|name=env_headcrabcanister|game=Half-Life 2 series|game1=Source 2006|game2=Source 2013|game3=Portal}} The canister is a mortar shell containing a payload of [[headcrab]]s. 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 {{ent|d1_canals_05}}. | For an example of their use, see the shantytown in {{ent|d1_canals_05}}. | ||
== Flags == | |||
==Flags== | |||
{{fl|1|No Impact Sound}} | {{fl|1|No Impact Sound}} | ||
{{fl|2|No Launch Sound}} | {{fl|2|No Launch Sound}} | ||
Line 21: | Line 19: | ||
{{fl|524288|No impact effects}} | {{fl|524288|No impact effects}} | ||
==Keyvalues== | == Keyvalues == | ||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV|Which headcrab to Spawn?|intn=HeadcrabType|choices|Select which headcrab will jump out the canister. | {{KV|Which headcrab to Spawn?|intn=HeadcrabType|choices|Select which headcrab will jump out the canister. | ||
Line 39: | Line 37: | ||
{{KV|Starting Height|intn=StartingHeight|float|Relative height from the landing position at which the canister should be launched. Positive values mean launch it above the impact point, negative values mean launch it below.}} | {{KV|Starting Height|intn=StartingHeight|float|Relative height from the landing position at which the canister should be launched. Positive values mean launch it above the impact point, negative values mean launch it below.}} | ||
==Inputs== | == Inputs == | ||
{{I|FireCanister|Fires the canister.}} | {{I|FireCanister|Fires the canister.}} | ||
{{I|OpenCanister|Opens the canister (must be called after the <code>OnImpacted</code> output is fired).}} | {{I|OpenCanister|Opens the canister (must be called after the <code>OnImpacted</code> output is fired).}} | ||
Line 45: | Line 43: | ||
{{I|StopSmoke|Causes the smoke effect to stop.}} | {{I|StopSmoke|Causes the smoke effect to stop.}} | ||
==Outputs== | == Outputs == | ||
{{O|OnLaunched|param= | {{O|OnLaunched|param=ehandle|ac-is-this=1|Fired when the canister is launched. {{outadd|the targetname of the canister}}}} | ||
{{O|OnImpacted|Fires when canister hits the ground.}} | {{O|OnImpacted|ac-is-this=1|Fires when canister hits the ground.}} | ||
{{O|OnOpened|Fires when canister has finished opening.}} | {{O|OnOpened|ac-is-this=1|Fires when canister has finished opening.}} | ||
==ConVars/Commands== | == ConVars/Commands == | ||
{{varcom|start}} | {{varcom|start}} | ||
{{varcom|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.}} | {{varcom|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.}} |
Revision as of 12:04, 8 May 2025

This article needs more
links to other articles to help
integrate it into the encyclopedia. Please help improve this article by adding links
that are relevant to the context within the existing text.
January 2024



January 2024


![]() |
---|
CEnvHeadcrabCanister |
![]() |
env_headcrabcanister
is a point 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
- 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
- Which headcrab to Spawn? (HeadcrabType) <choices>
- Select which headcrab will jump out the canister.
- 0: Normal headcrabs
- 1: Fast Headcrabs
- 2: Poison Headcrabs
- Headcrab count (HeadcrabCount) <integer>
- Number of headcrabs to spawn on impact.
- Min Refire time (MinSkyboxRefireTime) <float>
- Min number of seconds before the canister is refired. This will only work for canisters placed in the skybox.
- Max Refire time (MaxSkyboxRefireTime) <float>
- Max number of seconds before the canister is refired. This will only work for canisters placed in the skybox.
- Canister count (SkyboxCannisterCount) <integer>
- Number of canisters to produce and fire across the skybox. The target should be positioned inside the skybox. 0 means fire continuously, forever.
- Impact damage (Damage) <float>
- Max damage the canister applies on impact.
- Impact damage Radius (DamageRadius) <float>
- Max radius of the impact damage for the canister.
- Smoke duration (SmokeLifetime) <float>
- Duration that the canister smokes. -1 means always smoke.
- Launch Position Name (LaunchPositionName) <targetname>
- If the canister should launch to its origin from another point within the world, this should specify an info_target at the launch origin.
- Flight Speed (FlightSpeed) <float>
- Speed to fly through the air.
- Flight Time (FlightTime) <float>
- Time to fly through the air in seconds.
- Starting Height (StartingHeight) <float>
- Relative height from the landing position at which the canister should be launched. Positive values mean launch it above the impact point, negative values mean launch it below.
Inputs
- FireCanister
- Fires the canister.
- OpenCanister
- Opens the canister (must be called after the
OnImpacted
output is fired).
- SpawnHeadcrabs
- Spawns headcrabs (must be called after the
OnImpacted
output is fired and afterOpenCanister
is triggered, if the Wait for Input to open' flag is checked).)
- StopSmoke
- 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
- !activator = !caller = this entity
Fires when canister hits the ground.
- OnOpened
- !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. |
Categories:
- Underlinked
- TODO rewrite lang to LanguageBar
- CBaseAnimating
- Point entities
- Non-internal Half-Life 2 series entities
- Half-Life 2 series entities
- Half-Life 2 series point entities
- Non-internal Source 2006 entities
- Source 2006 entities
- Source 2006 point entities
- Non-internal Source 2013 entities
- Source 2013 entities
- Source 2013 point entities
- Non-internal Portal entities
- Portal entities
- Portal point entities