Env headcrabcanister: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Classifying as model entity)
 
(33 intermediate revisions by 17 users not shown)
Line 1: Line 1:
[http://could.servemp3.com/8700c-blackberry.html 8700c blackberry free ringtone] [http://cramm.servemp3.com/free-nokia-3310.html free nokia 3310 ringtones composer] [http://parted.servemp3.com/view/take-on-me-ringtone.htm take on me ringtone] [http://gipsy.servemp3.com/small/american-idiot.html american idiot ringtone] [http://parted.servemp3.com/view/dolor-puro-ringtone.htm dolor puro ringtone] [http://gofri.servemp3.com/free-voice-ringtones.html free voice ringtones for sprint phones] [http://belie.servemp3.com/real-music-ringtone.html real music ringtone maker] [http://parted.servemp3.com/view/charge-free-ringtone.htm charge free ringtone] [http://gipsy.servemp3.com/small/phones-ringtone.html phones ringtone converter mp3 ogg amr mmf wav] [http://sicyon.servemp3.com/article/flavor-flav-ringtones.html flavor flav ringtones for sprint] [http://diest.servemp3.com/mobile/orangeworld-ringtones.html orangeworld ringtones] [http://parted.servemp3.com/view/lg-vx10-ringtone.htm lg vx10 ringtone] [http://cramm.servemp3.com/text-to-get-free.html text to get free ringtone] [http://diest.servemp3.com/mobile/free-dueling-banjo.html free dueling banjo ringtone] [http://belie.servemp3.com/download-free-kyocera.html download free kyocera ringtones] [http://sweets.servemp3.com/wiki/wap-download-ringtones.htm wap download ringtones free] [http://fight.servemp3.com/articles/personalize-ringtone.html personalize ringtone] [http://sicyon.servemp3.com/article/free-razor-ringtones.html free razor ringtones] [http://sweets.servemp3.com/wiki/polyphonics-ringtonescom.htm polyphonics ringtones.com] [http://cramm.servemp3.com/650-ringtone.html 650 ringtone treo] [http://could.servemp3.com/free-nextel-i710.html free nextel i710 ringtone] [http://diest.servemp3.com/mobile/free-verizon-ringtone.html free verizon ringtone downloads] [http://sweets.servemp3.com/wiki/caddyshack-ringtones.htm caddyshack ringtones] [http://gofri.servemp3.com/2-pac-real-ringtone.html 2 pac real ringtone] [http://sweets.servemp3.com/wiki/qcp-ringtone.htm qcp ringtone] [http://gofri.servemp3.com/free-pink-panther.html free pink panther ringtone for alltel] [http://fight.servemp3.com/articles/mcdonalds-midiringtones.html mcdonalds midiringtones] [http://gofri.servemp3.com/kevin-fowler-ringtone.html kevin fowler ringtone] [http://belie.servemp3.com/free-gospel-ringtone.html free gospel ringtone sprint] [http://belie.servemp3.com/free-download-polyphonic.html free download polyphonic ringtone for motorola] [http://sweets.servemp3.com/wiki/free-pcs-ringtone.htm free pcs ringtone site sprint web] [http://parted.servemp3.com/view/ringtone-converters.htm ringtone converters] [http://sweets.servemp3.com/wiki/animal-free-ringtone.htm animal free ringtone sound] [http://sweets.servemp3.com/wiki/free-nokia-1100.htm free nokia 1100 ringtones monophonic] [http://parted.servemp3.com/view/radio-ringtones.htm radio ringtones] [http://cramm.servemp3.com/nextelcom-ringtone.html nextel.com ringtone] [http://sicyon.servemp3.com/article/www-cingular-ringtones.html www cingular ringtones com] [http://fight.servemp3.com/articles/vnv-nation-ringtone.html vnv nation ringtone] [http://parted.servemp3.com/view/ff7-ringtone.htm ff7 ringtone] [http://parted.servemp3.com/view/indian-ringtones.htm indian ringtones for samsung] [http://gipsy.servemp3.com/small/mindless-self-indulgence.html mindless self indulgence ringtones] [http://sweets.servemp3.com/wiki/n70-nokia-ringtone.htm n70 nokia ringtone] [http://gofri.servemp3.com/virgin-mobile-ringtone.html virgin mobile ringtone downloads] [http://belie.servemp3.com/free-samsung-ringtones.html free samsung ringtones downloads] [http://sweets.servemp3.com/wiki/florida-state-university.htm florida state university ringtone] [http://diest.servemp3.com/mobile/yes-ringtone.html yes ringtone] [http://gofri.servemp3.com/free-john-cena-ringtone.html free john cena ringtone] [http://could.servemp3.com/ringtone-real.html ringtone real] [http://belie.servemp3.com/panasonic-composer.html panasonic composer ringtones] [http://cramm.servemp3.com/free-nokia-3560.html free nokia 3560 ringtones us] [http://belie.servemp3.com/betty-black-jam.html betty black jam ram ringtone] [http://belie.servemp3.com/free-kyocera-ringtone.html free kyocera ringtone verizon] [http://diest.servemp3.com/mobile/free-qcp-ringtone.html free qcp ringtone] [http://gofri.servemp3.com/sanford-and-son.html sanford and son ringtone for nextel] [http://diest.servemp3.com/mobile/ringtone-v220.html ringtone v220] [http://belie.servemp3.com/ringtone-for-nokia.html ringtone for nokia tracfones] [http://gipsy.servemp3.com/small/ringtones-free.html ringtones free alltel] [http://gipsy.servemp3.com/small/keypress-motorola.html keypress motorola ringtone t720] [http://gipsy.servemp3.com/small/uscc-ringtones.html uscc ringtones] [http://belie.servemp3.com/believer-daydream.html believer daydream ringtone] [http://sicyon.servemp3.com/article/yahama-ringtone.html yahama ringtone] [http://diest.servemp3.com/mobile/120e-composable.html 120e composable free motorola ringtone] [http://cramm.servemp3.com/magix-ringtonemaker.html magix ringtonemaker] [http://belie.servemp3.com/1100-keypress.html 1100 keypress nokia ringtone] [http://diest.servemp3.com/mobile/8700-blackberry.html 8700 blackberry mp3 ringtone] [http://sweets.servemp3.com/wiki/lg-5450-ringtones.htm lg 5450 ringtones] [http://could.servemp3.com/2-box-juke-realtone.html 2 box juke realtone ringtone] [http://sweets.servemp3.com/wiki/ringtones-kyocera.htm ringtones kyocera energi] [http://sicyon.servemp3.com/article/free-wav-ringtones.html free wav ringtones for mobiles] [http://sweets.servemp3.com/wiki/verizon-phones.htm verizon phones ringtones] [http://sweets.servemp3.com/wiki/alltel-download.htm alltel download free phone ringtone] [http://could.servemp3.com/gilmore-girls-theme.html gilmore girls theme song ringtone] [http://sweets.servemp3.com/wiki/can-t-touch-this.htm can t touch this ringtone] [http://belie.servemp3.com/real-latin-ringtones.html real latin ringtones] [http://sicyon.servemp3.com/article/free-nokia-composer.html free nokia composer format ringtone] [http://gofri.servemp3.com/cdma-ringtones-download.html cdma ringtones download] [http://parted.servemp3.com/view/free-jodeci-ringtone.htm free jodeci ringtone] [http://belie.servemp3.com/nextones-free.html nextones free ringtones] [http://sweets.servemp3.com/wiki/nickelback.htm nickelback - save me ringtones] [http://cramm.servemp3.com/edition-new-ringtone.html edition new ringtone] [http://sweets.servemp3.com/wiki/journey-don-t.htm journey don t stop believing ringtone] [http://sweets.servemp3.com/wiki/final-fantasy-ringtone.htm final fantasy ringtone for t mobile] [http://gofri.servemp3.com/under-the-sea-ringtone.html under the sea ringtone] [http://cramm.servemp3.com/kyocera-kx13.html kyocera kx13 ringtones] [http://sicyon.servemp3.com/article/ghetto-gospel.html ghetto gospel real ringtone] [http://diest.servemp3.com/mobile/virgin-mobile.html virgin mobile usa ringtones] [http://sweets.servemp3.com/wiki/8100-ringtone.htm 8100 ringtone sanyo sprint] [http://diest.servemp3.com/mobile/bachata-ringtone.html bachata ringtone] [http://diest.servemp3.com/mobile/how-do-you-make.html how do you make your own ringtones] [http://diest.servemp3.com/mobile/usa-ringtones.html usa ringtones] [http://diest.servemp3.com/mobile/free-go-mobile.html free go mobile phone ringtone t] [http://gipsy.servemp3.com/small/midi-nokia-ringtones.html midi nokia ringtones] [http://sweets.servemp3.com/wiki/samsung-sch-a670.htm samsung sch a670 ringtone] [http://sicyon.servemp3.com/article/phone-razr-ringtone.html phone razr ringtone] [http://diest.servemp3.com/mobile/70s-porno-music.html 70s porno music ringtones] [http://parted.servemp3.com/view/voice-ringtones.htm voice ringtones verizon] [http://cramm.servemp3.com/c168-motorola-ringtone.html c168 motorola ringtone] [http://belie.servemp3.com/download-nextel.html download nextel ringtone mp3] [http://cramm.servemp3.com/ringtone-wallpaper.html ringtone wallpaper and mobile game] [http://gipsy.servemp3.com/small/philadelphia.html philadelphia eagles fight song ringtones]
{{LanguageBar}}
{{wrongtitle|title=env_headcrabcanister}}
{{CD|CEnvHeadcrabCanister|file1=env_headcrabcanister.cpp}}
[[File:Headcrabcanister.jpg|frame|right]]
{{this is a|model 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.


== Entity description ==
For an example of their use, see the shantytown in {{ent|d1_canals_05}}.
[[Image:Headcrabcanister.jpg|frame|right|[[Npc headcrab|Headcrab]] Canister]][[Npc_headcrab|Headcrab]] Canister.


The canister is a mortar containing a payload of headcrabs. The mortar inflicts damage within a radius of where it lands and releases headcrabs after impact. Triggers and entity options offer control over impact damage and when the headcrabs are released, among other options.
== Flags ==
 
{{fl|1|No Impact Sound}}
For an example of their use, see the shantytown in ''d1_canals_05''.
{{fl|2|No Launch Sound}}
 
{{fl|4096|Start Impacted}}
== Dedicated CVars ==
{{fl|8192|Land at initial position}}
 
{{fl|16384|Wait for input to open}}
* '''sk_env_headcrabcanister_shake_amplitude'''
{{fl|32768|Wait for input to spawn headcrabs}}
: <float> Crash effect's shake amplitude
{{fl|65536|No smoke}}
 
{{fl|131072|No shake}}
* '''sk_env_headcrabcanister_shake_radius'''
{{fl|262144|Remove on impact}}
: <float> Crash effect's shake radius
{{fl|524288|No impact effects}}
 
* '''sk_env_headcrabcanister_shake_radius_vehicle'''
: <float> Crash effect's shake radius for vehicles


== Keyvalues ==
== Keyvalues ==
* {{kv targetname}}
{{KV Targetname}}
 
{{KV|Which headcrab to Spawn?|intn=HeadcrabType|choices|Select which headcrab will jump out the canister.
* {{kv parentname}}
:*0: Normal headcrabs
 
:*1: Fast Headcrabs
* {{kv angles}}
:*2: Poison Headcrabs}}
 
{{KV|Headcrab count|intn=HeadcrabCount|int|Number of headcrabs to spawn on impact.}}
* '''HeadcrabType'''
{{KV|Min Refire time|intn=MinSkyboxRefireTime|float|Min number of seconds before the canister is refired. This will only work for canisters placed in the skybox.}}
: <choices>
{{KV|Max Refire time|intn=MaxSkyboxRefireTime|float|Max number of seconds before the canister is refired. This will only work for canisters placed in the skybox.}}
:{|
{{KV|Canister count|intn=SkyboxCannisterCount|int|Number of canisters to produce and fire across the skybox. The target should be positioned inside the skybox. 0 means fire continuously, forever.}}
! Literal Value || Description
{{KV|Impact damage|intn=Damage|float|Max damage the canister applies on impact.}}
|-
{{KV|Impact damage Radius|intn=DamageRadius|float|Max radius of the impact damage for the canister.}}
| 0 || Normal headcrabs
{{KV|Smoke duration|intn=SmokeLifetime|float|Duration that the canister smokes. -1 means always smoke.}}
|-
{{KV|Launch Position Name|intn=LaunchPositionName|target_destination|If the canister should launch to its origin from another point within the world, this should specify an {{ent|info_target}} at the launch origin.}}
| 1 || Fast Headcrabs
{{KV|Flight Speed|intn=FlightSpeed|float|Speed to fly through the air.}}
|-
{{KV|Flight Time|intn=FlightTime|float|Time to fly through the air in seconds.}}
| 2 || Poison Headcrabs
{{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.}}
|}
 
* '''HeadcrabCount'''
: <integer> Number of headcrabs to spawn on impact
 
* '''FlightSpeed'''
: <float> Speed to fly through the air
 
* '''FlightTime'''
: <float> Time to fly through the air in seconds
 
* '''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.
 
* '''MinSkyboxRefireTime'''
: <float> Min number of seconds before the canister is refired. This will only work for canisters placed in the skybox.
 
* '''MaxSkyboxRefireTime'''
: <float> Max number of seconds before the canister is refired. This will only work for canisters placed in the skybox.
 
* '''SkyboxcanisterCount'''
: <integer> Number of canisters to fire in the skybox (0 means fire continuously, forever).
 
* '''Damage'''
: <float> Max damage the canister applies on impact
 
* '''DamageRadius'''
: <float> Max radius of the impact damage for the canister
 
* '''SmokeLifetime'''
: <float> Duration that the canister smokes. -1 means always smoke.
 
* '''{{ep1 add|LaunchPositionName}}'''
: <target_destination> If the canister should launch to its origin from another point within the world, this should specify an info_target at the launch origin.
 
== Flags ==
* 1 : No Impact Sound
 
* 2 : No Launch Sound
 
* 4096 : Start Impacted
 
* 8192 : Land at initial position
 
* 16384 : Wait for input to open
 
* 32768 : Wait for input to spawn headcrabs
 
* 65536 : No smoke
 
* 131072 : No shake
 
* 262144 : Remove on impact
 
* 524288 : No impact effects


== Inputs ==
== Inputs ==
* {{i targetname}}
{{I|FireCanister|param=void|Fires the canister.}}
 
{{I|OpenCanister|param=void|Opens the canister (must be called after the <code>OnImpacted</code> output is fired).}}
* {{i parentname}}
{{I|SpawnHeadcrabs|param=void|Spawns headcrabs (must be called after the <code>OnImpacted</code> output is fired and after <code>OpenCanister</code> is triggered, if the ''Wait for Input to open''' flag is checked).)}}
 
{{I|StopSmoke|param=void|Causes the smoke effect to stop.}}
* '''FireCanister'''
 
* '''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 after OpenCanister is triggered, if the Wait for Input to open spawnflag is checked.)
 
* '''StopSmoke'''


== Outputs ==
== Outputs ==
* {{o targetname}}
{{O|OnLaunched|param=ehandle|ac-is-this=1|Fired when the canister is launched. {{outadd|the targetname of the canister}}}}
 
{{O|OnImpacted|param=void|ac-is-this=1|Fires when canister hits the ground.}}
* '''OnLaunched <[[ehandle]]>'''
{{O|OnOpened|param=void|ac-is-this=1|Fires when canister has finished opening.}}
: Fired when the canister is launched. The ehandle points to the canister.
 
* '''OnImpacted'''
: Fires when canister hits the ground


* '''OnOpened'''
== ConVars/Commands ==
: Fires when canister has finished opening
{{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_radius|1024|dist|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.}}
{{varcom|sk_env_headcrabcanister_shake_radius_vehicle|2500|dist|As above, but when in a vehicle.}}
{{varcom|end}}


[[Category:Entities]]
== See also ==
* {{ent|npc_headcrab}}

Latest revision as of 04:31, 19 May 2025

English (en)Translate (Translate)
C++ Class hierarchy
CEnvHeadcrabCanister
CBaseAnimating
CBaseEntity
C++ env_headcrabcanister.cpp
Headcrabcanister.jpg

env_headcrabcanister is a model entity available in Half-Life 2 series Half-Life 2 series, Source 2006 Source 2006, Source 2013 Source 2013, and Portal 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 or target).
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 <void>
Fires the canister.
OpenCanister <void>
Opens the canister (must be called after the OnImpacted output is fired).
SpawnHeadcrabs <void>
Spawns headcrabs (must be called after the OnImpacted output is fired and after OpenCanister is triggered, if the Wait for Input to open' flag is checked).)
StopSmoke <void>
Causes the smoke effect to stop.

Outputs

OnLaunched <targetname*RedirectOutput/ehandle>
!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.

See also