Chicken: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Keyvalues section should be cleaned up with templates, please do not add generic l4d2 or other templates as they only mess the place up)
m (Classifying as model entity)
 
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Image:Chicken.png|thumb|right|200px|Chicken]]
{{Preserved entity|all}}
{{ent not in fgd}}
{{CD|CChicken|base=CDynamicProp|file1=chicken.cpp}}
{{csgo point|chicken}}
[[File:csgo_chicken.png|thumb|right|200px|Chicken since 2021-05-03.]]
[[File:Chicken.png|thumb|right|200px|Chicken before 2021-05-03.]]


==Entity Description==
{{this is a|model entity|game=Counter-Strike: Global Offensive|name=chicken}}
A chicken. Identical to the [[pet_entity]] and [[info_map_parameters|info_map_parameters']] Pet Population keyvalue, but it ''will'' spawn automatically without need of [[Navigation Meshes|Navigation Mesh]]. ''{{todo|Add extra description to this entity.}}''
This is an animated chicken. It moves around and plays some sounds by itself.
* 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 {{ent|pet_entity}}, but directly placing this entity will ''not'' require a [[Navigation Meshes|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 {{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}}
{{KV Targetname}}
{{KV Parentname}}
{{KV|Chicken Model|intn=SetBodyGroup|choices|Holiday submodels of chicken.}}
{{KV Global}}
{{KV Angles}}
{{ScrollBox|title=Health|}}
{{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 (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|}}
:* 0 : No
:* 1 : Yes
{{KV DistanceFade}}
{{ScrollBox|title=Render Fields|}}
{{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 102: Line 21:
:* 4 : Bunny ears
:* 4 : Bunny ears
:* 5 : Pumpkin head
:* 5 : Pumpkin head
==FGD Code==
<pre>
@PointClass base(Targetname, Parentname, Global, Angles, BreakableProp, SystemLevelChoice, BaseFadeProp, RenderFields, Shadow) studio("models/chicken/chicken.mdl") = chicken :
    "Chicken AI entity."
[
    Health(integer) : "Health" : 1 : "Set higher with damage to hurt to make chicken invincible."
    minhealthdmg(integer) : "Damage to hurt" : 1 : "Set higher with health to make chicken invincible."
    glowdist(integer)      : "Glow Distance" : 1024
    glowenabled(boolean) : "Glow by default?" : 0
    glowcolor(color255) : "Glow Color (R G B)" : "255 255 255" : "The color of the glow (if enabled)."
    glowstyle(choices) : "Glow Style" : 0 : "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)"
    ]
skin(integer) : "Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default."
    SetBodyGroup(choices) : "Chicken model": 0 : "Holiday submodels of chicken" =
    [
        0 : "Default"
        1 : "Party Hat"
        2 : "Ghost"
        3 : "Sweater"
        4 : "Bunny ears"
5 : "Pumpkin head"
    ]
    input SetGlowEnabled(void) : "Starts the glow."
    input SetGlowDisabled(void) : "Stops the glow."
    input SetGlowColor(color255) : "Change the glow's color. Format: <Red 0-255> <Green 0-255> <Blue 0-255>"
    input GlowColorRedValue(float) : "Sets the glow red color channel's value (0 - 255)."
    input GlowColorGreenValue(float) : "Sets the glow green color channel's value (0 - 255)."
    input GlowColorBlueValue(float) : "Sets the glow blue color channel's value (0 - 255)."
    output OnHealthChanged(void) : "Fires output when health changes."
         
]
</pre>
Instruction on placing the FGD Code:


Paste the FGD code in the last line of the [[csgo.fgd]]. The csgo.fgd can be found in CS:GO's bin folder.
== See Also ==
* {{ent|pet_entity}}
* {{ent|info_map_parameters/Counter-Strike series|alt=info_map_parameters}}

Latest revision as of 04:30, 19 May 2025

Recycle-warning.png
This is a preserved entity.
If the game has round restart mechanics this entity may not behave as expected.
C++ Class hierarchy
CChicken
CDynamicProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity
C++ chicken.cpp
Chicken since 2021-05-03.
Chicken before 2021-05-03.

chicken is a model entity available in Counter-Strike: Global Offensive Counter-Strike: Global Offensive. 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

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

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

See Also