Env headcrabcanister: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Classifying as model entity)
 
(41 intermediate revisions by 23 users not shown)
Line 1: Line 1:
[http://astw56.uv.ro/styles/citizenship/ citizenship] [http://nymphatacita.talk4fun.net/malaysians-airlines/ malaysians airlines] [http://oktagudent.totalh.com/view/ordeal-in/ ordeal in] [http://astw56.uv.ro/styles/fluoride/ fluoride] [http://robotqueen.uv.ro/library/psychic-healers/ psychic healers] [http://arguas.pluto.ro/lib/free-game.html free game downloads] [http://antimil.uv.ro/small/phone-number.html phone number lookup] [http://antimil.uv.ro/small/watch-tv.html watch tv] [http://cykeout.byethost13.com/resources/leadership-styles.html leadership styles tests] [http://shadowfallen.totalh.com/data/womens-lingerie/ womens lingerie fashions] [http://uncloudedwindow.sapte.ro/data/women-porn.html women porn] [http://robotqueen.uv.ro/library/ceramic-tile/ ceramic tile floor design] [http://kristmasu.xhost.ro/business-plan/ business plan] [http://antimil.uv.ro/small/jacuzzi-accessories.html jacuzzi accessories] [http://chuchundramc.marte.ro/view/country-wide.html country wide] [http://theeblog.22web.net/data/murphy-bed/ murphy bed with book case] [http://uncloudedwindow.sapte.ro/data/midazolam.html midazolam] [http://uncloudedwindow.sapte.ro/data/teenpussy.html teenpussy] [http://cykeout.byethost13.com/resources/medical-school.html medical school rankings] [http://robotqueen.uv.ro/library/music-dowload/ music dowload site] [http://aussiejesus.uv.ro/web/robots/ robots] [http://theeblog.22web.net/data/self-management/ self management techniques] [http://kristmasu.xhost.ro/skin-care/ skin care] [http://oktagudent.totalh.com/view/audio-driver/ audio driver download windows xp] [http://fnor.22web.net/text/oregon-cell/ oregon cell phone service] [http://kinkyjedi.uv.ro/web/gis/ gis] [http://kristmasu.xhost.ro/swiss-replica/ swiss replica watch] [http://jazzyjoe.byethost13.com/content/video-editting.html video editting software free] [http://ariavaswen.22web.net/description/mountain-bikes/ mountain bikes for sale online] [http://antimil.uv.ro/small/mexicali.html mexicali] [http://astw56.uv.ro/styles/newborn/ newborn] [http://shadowfallen.totalh.com/data/tax-pro/ tax pro] [http://chuchundramc.marte.ro/view/online-casino.html online casino gambling] [http://thedrea.uv.ro/text/cheapest-air/ cheapest air ticket] [http://kinkyjedi.uv.ro/web/southern-california/ southern california] [http://kasumikawaii.byethost13.com/articles/trael-agents/ trael agents] [http://kinkyjedi.uv.ro/web/sexy-plus/ sexy plus size lingerie] [http://antimil.uv.ro/small/match-com.html match com] [http://aussiejesus.uv.ro/web/boston-college/ boston college] [http://fnor.22web.net/text/pooch-park/ pooch park] [http://astw56.uv.ro/styles/us-cellular/ us cellular ringtones] [http://cykeout.byethost13.com/resources/mailer-video.html mailer video] [http://robotqueen.uv.ro/library/metronidazole/ metronidazole] [http://kinkyjedi.uv.ro/web/motorcycle-parts/ motorcycle parts] [http://antimil.uv.ro/small/frontier-air.html frontier air lines] [http://astw56.uv.ro/styles/cheap-air/ cheap air flights travel directions] [http://nymphatacita.talk4fun.net/i-woke/ i woke up tonight] [http://astw56.uv.ro/styles/bed-bath/ bed bath] [http://urockworld.marte.ro/kitchen-design.html kitchen design gallery] [http://nymphatacita.talk4fun.net/so-dimm/ so dimm ddr2] [http://aussiejesus.uv.ro/web/claritin/ claritin] [http://radicaldreamerr.byethost13.com/new/ask-help.html ask help desk] [http://nymphatacita.talk4fun.net/ivy-house/ ivy house hotel and restaurant] [http://radicaeamerr.xhost.ro/content/cheap-ticket/ cheap ticket airline] [http://kristmasu.xhost.ro/rosacea/ rosacea] [http://thedrea.uv.ro/text/dating-services/ dating services] [http://theeblog.22web.net/data/victims-of/ victims of the tsunamis] [http://kasumikawaii.byethost13.com/articles/peru-artists/ peru artists] [http://fnor.22web.net/text/add-com/ add com port to windows xp] [http://urockworld.marte.ro/nike-air.html nike air force 1] [http://aussiejesus.uv.ro/web/meridia-generic/ meridia generic] [http://nymphatacita.talk4fun.net/west-hants/ west hants warriors] [http://radicaeamerr.xhost.ro/content/golf-apparel/ golf apparel] [http://oktagudent.totalh.com/view/ekle-site/ ekle site tatil] [http://uncloudedwindow.sapte.ro/data/motorcycle-games.html motorcycle games] [http://bervera.talk4fun.net/description/monitor-panel/ monitor panel] [http://radicaldreamerr.byethost13.com/new/new-best.html new best seller] [http://radicaeamerr.xhost.ro/content/silkscreen/ silkscreen] [http://ariavaswen.22web.net/description/replacing-birth/ replacing birth certificates] [http://copperwise.byethost13.com/html/vacation-cruises.html vacation cruises] [http://robotqueen.uv.ro/library/discount-coach/ discount coach handbag] [http://radicaldreamerr.byethost13.com/new/atv-accessaries.html atv accessaries] [http://fnor.22web.net/text/igreja-de/ igreja de nova vida] [http://astw56.uv.ro/styles/cipro/ cipro] [http://kinkyjedi.uv.ro/web/free-business/ free business card template] [http://oktagudent.totalh.com/view/least-restrictive/ least restrictive environment definition] [http://fnor.22web.net/text/raid-harddrive/ raid harddrive] [http://oktagudent.totalh.com/view/marys-lullaby/ marys lullaby] [http://astw56.uv.ro/styles/haven-holidays/ haven holidays] [http://aussiejesus.uv.ro/web/longines/ longines] [http://kasumikawaii.byethost13.com/articles/supplier-tea/ supplier tea] [http://robotqueen.uv.ro/library/bedroom-decoration/ bedroom decoration] [http://radicaldreamerr.byethost13.com/new/mp-minder.html mp3 minder] [http://kinkyjedi.uv.ro/web/costume-discount/ costume discount halloween] [http://urockworld.marte.ro/sexy-chats.html sexy chats] [http://robotqueen.uv.ro/library/wire-wheels/ wire wheels] [http://oktagudent.totalh.com/view/archive-newspaper/ archive newspaper articles] [http://arguas.pluto.ro/lib/tissot-gold.html tissot gold] [http://kasumikawaii.byethost13.com/articles/swiss-travel/ swiss travel agents] [http://radicaeamerr.xhost.ro/content/cheerleading-uniforms/ cheerleading uniforms] [http://radicaeamerr.xhost.ro/content/international-airfare/ international airfare] [http://copperwise.byethost13.com/html/osteoarthritis.html osteoarthritis] [http://kristmasu.xhost.ro/multimedia-projector/ multimedia projector] [http://oktagudent.totalh.com/view/what-is/ what is social science] [http://uncloudedwindow.sapte.ro/data/video-codec.html video codec download] [http://theeblog.22web.net/data/zed/ zed 24] [http://antimil.uv.ro/small/pregnancy-early.html pregnancy early symptoms] [http://robotqueen.uv.ro/library/air-tahiti/ air tahiti] [http://kristmasu.xhost.ro/diaper-for/ diaper for adult] [http://antimil.uv.ro/small/part-time.html part time job uk]
{{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}}
{{fl|2|No Launch Sound}}
{{fl|4096|Start Impacted}}
{{fl|8192|Land at initial position}}
{{fl|16384|Wait for input to open}}
{{fl|32768|Wait for input to spawn headcrabs}}
{{fl|65536|No smoke}}
{{fl|131072|No shake}}
{{fl|262144|Remove on impact}}
{{fl|524288|No impact effects}}


For an example of their use, see the shantytown in ''d1_canals_05''.
== Keyvalues ==
{{KV Targetname}}
{{KV|Which headcrab to Spawn?|intn=HeadcrabType|choices|Select which headcrab will jump out the canister.
:*0: Normal headcrabs
:*1: Fast Headcrabs
:*2: Poison Headcrabs}}
{{KV|Headcrab count|intn=HeadcrabCount|int|Number of headcrabs to spawn on impact.}}
{{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.}}
{{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.}}
{{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.}}
{{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.}}
{{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.}}
{{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.}}


==Dedicated Console Variables==
== Inputs ==
{{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|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.}}


* '''sk_env_headcrabcanister_shake_amplitude'''
== Outputs ==
: <float> Crash effect's shake amplitude
{{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.}}
{{O|OnOpened|param=void|ac-is-this=1|Fires when canister has finished opening.}}


* '''sk_env_headcrabcanister_shake_radius'''
== ConVars/Commands ==
: <float> Crash effect's shake radius
{{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}}


* '''sk_env_headcrabcanister_shake_radius_vehicle'''
== See also ==
: <float> Crash effect's shake radius for vehicles
* {{ent|npc_headcrab}}
 
==Keyvalues==
 
* {{kv targetname}}
 
* {{kv parentname}}
 
* {{kv angles}}
 
* '''HeadcrabType'''
: <choices>
:{|
! Literal Value || Description
|-
| 0 || Normal headcrabs
|-
| 1 || Fast Headcrabs
|-
| 2 || Poison Headcrabs
|}
 
* '''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==
 
* {{i targetname}}
 
* {{i parentname}}
 
* '''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==
 
* {{o targetname}}
 
* '''OnLaunched <[[ehandle]]>'''
: Fired when the canister is launched. The ehandle points to the canister.
 
* '''OnImpacted'''
: Fires when canister hits the ground
 
* '''OnOpened'''
: Fires when canister has finished opening
 
[[Category:Entities]]

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