Chicken: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Is in FGD by now - removed FGD code. Added new image.)
(KV/I/O cleanup. Preserved entity.)
Line 2: Line 2:
[[Image:Chicken.png|thumb|right|200px|Chicken before 2021-05-03.]]
[[Image:Chicken.png|thumb|right|200px|Chicken before 2021-05-03.]]
{{csgo point|chicken}}
{{csgo point|chicken}}
{{preservedEnt|0}}
{{code class|CChicken|chicken.cpp}}


==Entity Description==
==Entity Description==
This is an animated chicken. It moves around and plays some sounds by itself.
This is an animated chicken. It moves around and plays some sounds by itself.
* A [[player]] can {{ent|+use}} it to make it follow him. The "owner" is notified in the chat if his chicken dies.
* A [[player]] can {{ent|+use}} it to make it follow them. When a new round starts, the chicken is preserved and spawns near its "owner". When it dies, the "owner" is notified in the chat.
* It is normally spawned with [[pet_entity]], but directly placing this entity will ''not'' require a [[Navigation Meshes|Navigation Mesh]].
* It is normally spawned with [[pet_entity]], but directly placing this entity will ''not'' require a [[Navigation Meshes|Navigation Mesh]].
* If this entity is killed, it will ''not'' respawn, even between rounds. Use [[pet_entity]] to get around this.
* It is one of the [[preserved entities]], so if this entity is map placed and killed, it will ''not'' respawn, even between rounds. Use [[pet_entity]] to get around this.
* Chickens spawn independently around the map in the [[CS:GO Gamemodes: Deathmatch|deathmatch]] [[CSGO Game Mode Commands|game mode]].
* Chickens spawn independently around the map in the {{csgo mode|Dm}} [[CS:GO Game Modes|game mode]].
The chicken model has multiple color variants that can be set with this entity's <code>skin</code> KeyValue and/or Input with a value within 0-4.


== Keyvalues==
== Keyvalues==
{{KV Targetname}}
{{ScrollBox|
{{KV Parentname}}
{{KV BaseEntity|noscroll=1}}
{{KV Global}}
{{KV BaseAnimating|noscroll=1}}
{{KV Angles}}
{{KV DynamicProp|l4d2=1}}
{{ScrollBox|title=Health|}}
{{KV BreakableProp}}
{{KV|Strength/Health (health)|integer|Health of the chicken}}
}}
{{KV|Maximum Health (max_health)|integer|'''Health''' cannot exceed this amount.}}
 
{{KV|Min Damage to Hurt (minhealthdmg)|int|If a single hit to the object doesn't do at least this much damage, the chicken won't take ''any'' of the damage it attempted to give.}}
{{KV|Damage Filter Name|intn=damagefilter|targetname|When this entity receives damage, it will [[filter]] by this entity.}}
{{KV|Damage Filter Name (damagefilter)|targetname|When this entity receives damage, it will [[filter]] by this entity.}}
{{ScrollBox|title=System Level Choices|}}
{{KV|Minimum CPU Level|choices|}}
:* 0 : default (low)
:* 1 : low
:* 2 : medium
:* 3 : high
{{KV|Maximum CPU Level|choices|}}
:* 0 : default (High)
:* 1 : low
:* 2 : medium
:* 3 : high
{{KV|Minimum GPU Level|choices|}}
:* 0 : default (very low)
:* 1 : very low
:* 2 : low
:* 3 : medium
:* 4 : high
{{KV|Maximum GPU Level|choices|}}
:* 0 : default (high)
:* 1 : very low
:* 2 : low
:* 3 : medium
:* 4 : high
{{KV|Disable X360|choices|}}
{{KV|Disable X360|choices|}}
:* 0 : No
:* 0 : No
:* 1 : Yes
:* 1 : Yes
{{KV DistanceFade}}
{{minititle|Chicken Models and Skins}}
{{ScrollBox|title=Render Fields|}}
{{KV|Chicken Model|intn=SetBodyGroup|choices|Holiday submodels of chicken.}}
{{KV|[[Render Mode]] (rendermode)|choices|Set a non-standard rendering mode on this entity.}}
:{{ExpandBox|
:*0: Normal
:*1: Color
:*2: Texture
:*3: Glow
:*4: Solid/Alphatest
:*5: Additive
:*6: Removed, does nothing
:*7: Additive Fractional Frame
:*8: Alpha Add
:*9: World Space Glow
:*10: Don't Render}}
{{KV|Render FX (renderfx)|choices|Preset pattern of appearance effects.}}
:{{ExpandBox|
:*'''0:''' None
:*'''1:''' Slow Pulse
:*'''2:''' Fast Pulse
:*'''3:''' Slow Wide Pulse
:*'''4:''' Fast Wide Pulse
:*'''5:''' Slow Fade Away
:*'''6:''' Fast Fade Away
:*'''7:''' Slow Become Solid
:*'''8:''' Fast Become Solid
:*'''9:''' Slow Strobe
:*'''10:''' Fast Strobe
:*'''11:''' Faster Strobe
:*'''12:''' Slow Flicker
:*'''13:''' Fast Flicker
:*'''14:''' Constant Glow
:*'''15:''' Distort
:*'''16:''' Hologram (Distort + fade)
:*'''17:''' Scale Up
:*'''22:''' Spotlight FX
:*'''23:''' Cull By Distance
:*'''24:''' Fade Wider Pulse
:*'''26:''' Fade Near}}
:{{todo|18-21, 25}}
{{KV|Render FX / Transparency (0 - 255) (renderamt)|int|Transparency amount, requires a Render Mode other than '''Normal'''. 0 is invisible, 255 is fully visible.}}
{{KV|Render Color (R G B) (rendercolor)|color255|Color tint.}}
{{ScrollBox|title=Glow|}}
{{KV|Glow by default?(glowenabled)|bool|Should prop glow on spawn?}}
{{KV|Glow Distance(glowdist)|int|Controls how far the glow should be visible.}}
{{KV|Glow Color(glowcolor)|color255|The color of the glow (if enabled).}}
{{KV|Glow Style(glowstyle)|choices|What style of glow should be used.}}
:* 0 : Default (through walls)
:* 1 : Shimmer (doesn't glow through walls)
:* 2 : Outline (doesn't glow through walls)
:* 3 : Outline Pulse (doesn't glow through walls)
{{ScrollBox|title=Chicken Models and Skins|}}
{{KV|Skin|choices|The chicken model has multiple color variants, use 0 for default color.}}
{{KV|Chicken Model(SetBodyGroup)|choices|Holiday submodels of chicken.}}
:* 0 : Default
:* 0 : Default
:* 1 : Party Hat
:* 1 : Party Hat
Line 106: Line 33:
:* 4 : Bunny ears
:* 4 : Bunny ears
:* 5 : Pumpkin head
:* 5 : Pumpkin head
== Inputs ==
{{ScrollBox|
{{I BaseEntity|noscroll=1}}
{{I BaseAnimating|noscroll=1}}
{{I DynamicProp}}
{{I BreakableProp}}
}}
== Outputs ==
{{O DynamicProp}}
{{O BreakableProp}}
{{O BaseAnimating|noscroll=1}}
{{O BaseEntity|noscroll=1}}

Revision as of 20:52, 25 April 2022

Chicken since 2021-05-03.
Chicken before 2021-05-03.

chicken is a point entity available in Counter-Strike: Global Offensive Counter-Strike: Global Offensive.

Icon-Important.pngImportant:This is a preserved entity in.
If the game has round restart mechanics this entity may not behave as expected:
More info
  • On a new round entities with this classname will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non-preserved entities may have undesirable effects.
C++ In code, it is represented by theCChickenclass, defined in thechicken.cppfile.

Entity Description

This is an animated chicken. It moves around and plays some sounds by itself.

  • A player can +use it to make it follow them. When a new round starts, the chicken is preserved and spawns near its "owner". When it dies, the "owner" is notified in the chat.
  • It is normally spawned with pet_entity, but directly placing this entity will not require a Navigation Mesh.
  • It is one of the preserved entities, so if this entity is map placed and killed, it will not respawn, even between rounds. Use pet_entity to get around this.
  • Chickens spawn independently around the map in the CS:GO/CS2 Deathmatch Deathmatch game mode.

The chicken model has multiple color variants that can be set with this entity's skin KeyValue and/or Input with a value within 0-4.

Keyvalues

Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history

CDynamicProp:

Default Animation (DefaultAnim) <string>
The animation this prop will play when not doing a random or forced animation.
Randomly Animate (RandomAnimation) <boolean>
Makes the prop randomly select and play animations at intervals defined by the Min/Max Random Anim Time KVs. In between the random animations, it will revert to playing Default Animation.
Note.pngNote:Will only select from animation $sequences linked with ACT_IDLE if they exist.
Ignore NPC Collisions (IgnoreNPCCollisions) <choices> (only in Black Mesa)
Disable collisions for NPCs if yes.
  • 0: No
  • 1: Yes
Min Random Anim Time (MinAnimTime) <float>
Minimum time between random animations.
Max Random Anim Time (MaxAnimTime) <float>
Maximum time between random animations.
Update children (updatechildren) <boolean> (in all games since Left 4 Dead)
Update touches for any children that are attached to attachment points as this prop animates. This allows SetParentAttached triggers or func_brushes to touch properly.
Glow State (glowstate) <choices>
What is allowed to activate the glow effect on this prop.
  • 0: OFF (must be activated through inputs)
  • 1: +use
  • 2: when looked at
  • 3: ON (starts activated)
Glow Range (glowrange) <integer>
Range at which the glow becomes visible. 0 means always visible.
Glow Range Min (glowrangemin) <integer>
Range at which glow stops being visible. 0 means always visible.
Glow Color Override (R G B) (glowcolor) <color255>
Color of the glow.
Disable Bone Followers (DisableBoneFollowers) <boolean> (in all games since Source 2009)
Disables generation of phys_bone_followers for each convex piece the model has in its collision model. phys_bone_followers can quickly eat up the edict count, so this keyvalue can be very helpful in freeing resources. This will however make the collision model no longer function ([confirm] As in become non-solid?), and the model will not be able to ragdoll anymore.
Hold Animation (HoldAnimation) <boolean> (in all games since Alien Swarm)
If set, the prop will not loop its animation, but hold the last frame.
Animate Every Frame (AnimateEveryFrame) <boolean> (in all games since Portal 2)
Force this prop to animate every frame. Usually this doesn't need to be touched.

GMODSandbox:

Allow Physics Gun (gmod_allowphysgun) <boolean> (only in Garry's Mod)
If set, players cannot use Physics Gun on this entity.
Sandbox Tool Whitelist (gmod_allowtools) <string> (only in Garry's Mod)
If set, only given tools can be used on this entity. You need to supply the tool class names, the names of the .lua files of those tools. This also includes the context menu properties!

BreakableProp:

Explosion Damage (ExplodeDamage) <float>
If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also Explosion Radius.
Explosion Radius (ExplodeRadius) <float>
If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also Explosion Damage.
Sound to make when punted (puntsound) <sound> (in all games since Half-Life 2: Episode One)
Sound to make when punted by gravity gun.
Break Model Message (BreakModelMessage) <string> (only in Source 2013)
"If set, will use this break model message instead of the normal break behavior."

Breakable (common):

Performance Mode (PerformanceMode) <choices>
Used to limit the amount of gibs produced when this entity breaks, for performance reasons.
Choices
  • 0: Normal
  • 1: No Gibs
  • 2: Full Gibs on All Platforms (Xbox 360, PS3, etc)
  • 3: Reduced gibs
Min Damage to Hurt (minhealthdmg) <integer>
If a single hit to the object doesn't do at least this much damage, the prop won't take any of the damage it attempted to give.
Pressure Delay (PressureDelay) <float>
Seconds to delay breaking from pressure. Allows creaking/groaning sounds to play.
Health (health) <integer>
How close to breaking the object is.
Maximum Health (max_health) <integer>
Health cannot exceed this amount.
Physics Impact Damage Scale (physdamagescale) <float>
Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
Breakable By (BreakableType) <choices> (only in Left 4 Dead seriesLeft 4 Dead series)
Who can break this?
  • 0: Everyone
  • 1: All Infected
  • 2: Only Tanks
Non-Valve games Black Mesa
Enable Explosion Override (explosion_override) <choices> (only in Black Mesa) !FGD
Enable/disable explosion parameters override (explosion_particle, explosion_particle_liquid, explosion_attachment, explosion_soundscript and explosion_soundscript_liquid).
  • 0: No
  • 1: Yes
Explosion Particle (explosion_particle) <string> (only in Black Mesa) !FGD
A particle system to use when this entity explodes.
Explosion Particle Underwater (explosion_particle_liquid) <string> (only in Black Mesa) !FGD
A particle system to use when this entity explodes in water.
Explosion Attachment Point (explosion_attachment) <string> (only in Black Mesa) !FGD
An attachment point to use for custom explosion particle system.
Note.pngNote:Only for model entities, even despite the fact that this is also present in brush entities.
Explosion Sound Script (explosion_soundscript) <sound> (only in Black Mesa) !FGD
A sound script to use when this entity explodes.
Explosion Sound Script Underwater (explosion_soundscript_liquid) <sound> (only in Black Mesa) !FGD
A sound script to use when this entity explodes in water.
Icon-Important.pngImportant:Both explosion_soundscript and explosion_soundscript_liquid require a sound script, a raw sound file will not work.


Damage Filter Name (damagefilter) <targetname>
When this entity receives damage, it will filter by this entity.
Disable X360 ([todo internal name (i)]) <choices>
  • 0 : No
  • 1 : Yes

Chicken Models and Skins:

Chicken Model (SetBodyGroup) <choices>
Holiday submodels of chicken.
  • 0 : Default
  • 1 : Party Hat
  • 2 : Ghost
  • 3 : Sweater
  • 4 : Bunny ears
  • 5 : Pumpkin head

Inputs

Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history

CDynamicProp:

SetAnimation <stringRedirectInput/string>
Forces the prop to play the named animation.
SetDefaultAnimation <stringRedirectInput/string>
Changes the animation played when not in a random/forced sequence.
SetPlaybackRate <floatRedirectInput/float>
Sets the framerate at which animations are played.
TurnOff
Hides the prop through EF_NODRAW. The Disable input does the exact same thing.
TurnOn
Shows the prop (by removing EF_NODRAW). The Enable input does the exact same thing.
DisableCollision
Tells the prop to no longer be solid.
EnableCollision
Tells the prop to become solid again.
SetAnimationNoReset <stringRedirectInput/string> (in all games since Alien Swarm)
Force the prop to play an animation unless the prop is already playing the animation. The parameter should be the name of the animation.
FadeAndKill  (in all games since Portal 2)
Fade out then remove this prop.

BreakableProp:

Break
Breaks the breakable.
SetHealth <integerRedirectInput/integer>
Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
AddHealth <integerRedirectInput/integer>
Adds health to the breakable.
RemoveHealth <integerRedirectInput/integer>
Removes health from the breakable.
physdamagescale <floatRedirectInput/float>
Sets Physics Impact Damage Scale. 0 means this feature is disabled for backwards compatibility.
EnablePhyscannonPickup
Makes the breakable able to picked up by the gravity gun.
DisablePhyscannonPickup
Makes the breakable not able to picked up by the gravity gun.
EnablePuntSound  (in all games since Half-Life 2: Episode One)
Allow this prop from playing its Punt Sound sound when punted by the gravity gun.
DisablePuntSound  (in all games since Half-Life 2: Episode One)
Prevent this prop from playing its Punt Sound sound when punted by the gravity gun.

Outputs

CDynamicProp:

OnAnimationBegun
Fired when an animation begins.
OnAnimationDone
Fired when an animation finishes.

BreakableProp:

OnBreak
!activator = entity that breaks the object
!caller = this entity
Fired when this object breaks.
OnHealthChanged <floatRedirectOutput/float>
!activator = entity that caused the health change
!caller = this entity
Fired whenever the health of the breakable has increased or decreased. This output automatically puts the new health amount as a decimal percent (e.g. 45% = 0.45) into the parameter box for inputs, if the mapper does not override the parameter with something else.
OnTakeDamage
!activator = entity that caused the damage
!caller = this entity
Fired when damage is taken.
OnPhysCannonAnimatePreStarted
!activator = none
!caller = this entity
Fired when prop starts its ACT_PHYSCANNON_ANIMATE_PRE activity. Caused by the object being picked up by the gravity gun.
OnPhysCannonAnimatePullStarted
!activator = none
!caller = this entity
Fired when prop has started its ACT_PHYSCANNON_ANIMATE activity. ACT_PHYSCANNON_ANIMATE_PRE plays once, then ACT_PHYSCANNON_ANIMATE starts looping.
OnPhysCannonDetach
!activator = none
!caller = this entity
Fired when prop has started its ACT_PHYSCANNON_DETACH activity (caused by the gravity gun ripping it from a wall).
OnPhysCannonAnimatePostStarted
!activator = none
!caller = this entity
Fired when prop has started its ACT_PHYSCANNON_ANIMATE_POST activity (caused by the player letting the prop go from the gravity gun).
OnPhysCannonPullAnimFinished
!activator = none
!caller = this entity
Fired when prop has finished all gravity gun-related animations.
Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history