Npc turret ceiling: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Cleanup)
(-added class hierarchy, cleanup)
 
(20 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar}}
|ru=Npc_turret_ceiling:ru
{{CD|CNPC_CeilingTurret|file1=1}}
}}
{{this is a|model entity|name=npc_turret_ceiling|game=Half-Life 2 series}}
{{DISPLAYTITLE:npc_turret_ceiling}}
[[File:combine_turret_ceiling.jpg|150px|right|Ceiling Turret]]
{{hl2 point|npc_turret_ceiling}}
[[Image:combine_turret_ceiling.jpg|150px|right|Ceiling Turret]]


A [[Combine]] [[turret]] attached to the ceiling. {{immobile npc}}
A [[Combine]] [[turret]] attached to the ceiling. {{immobile npc}}


Rarely used in [[Half-Life 2]] (if at all), in favor of its cousin [[npc_combine_camera]]. See also its siblings: [[npc_turret_ground]] and [[npc_turret_floor]].
Rarely used in [[Half-Life 2]], this turret deploys from the ceiling. Not to be confused with its cousin [[npc_combine_camera]], or its siblings [[npc_turret_ground]] and [[npc_turret_floor]]. It has 1000 health by default and perfect accuracy, intended to be used as an "insta-kill" punishment/deterrent. For examples of its use, see the tripwire laser room in <code>d3_c17_10b</code> or the ammo-less turrets at the beginning of <code>ep1_c17_00</code>.


{{Warning|This turret is really strong, and when it dies, the sound sometimes stays''}}
{{Bug|hidetested=true|This turret is partially broken and/or unfinished.
* The looping engine sound can sometimes stay after being destroyed or retired.
* The firing sound is missing, but the bullets flying past you still produce sounds.
* The firing animation plays only on the first shot. This can be fixed by adding "Loop" to the firing sequences.
* The firing animation while out of ammo plays sporadically.
* The turret may have difficulty firing at enemies directly underneath it.
* While the similarly built [[npc_combine_camera]] blends Deploy/Idle/Retract animations, this turret seems to be incapable of doing so, which causes the idle animation to jarringly snap into place. Even if the same nodes and transitions, or fadein/-out are used.
{{fix|If you have the source code, you can fix most of npc_turret_ceiling's bugs according to the fixes listed on [[npc_turret_ceiling/fixes|this page]].|code}} }}
Due to these bugs you might want to consider using [[npc_turret_floor]] as an alternative, as its equally as dangerous, but not as buggy and slightly more work to implement.


{{NPCNote}}
{{NPCNote}}


==Keyvalues==
== Keyvalues ==
{{KV Targetname}}
{{KV Targetname}}
{{KV Angles}}
{{KV Model|spawn model=models/combine_turrets/ceiling_turret.mdl}}
{{KV Studiomodel}}


==Flags==
== Flags ==
* 1 : Wait Till Seen
{{fl|16|Efficient - Don't acquire enemies or avoid obstacles}}
* 2 : Gag
{{fl|32|Autostart}}
:No IDLE sounds until angry
{{fl|64|Start Inactive}}
* 4 : Fall to ground
{{fl|128|Fast Retire}}
:Unchecked means *teleport* to ground
{{fl|256|Out of Ammo}}
* 8 : Drop Healthkit
* 16 : Efficient - Don't acquire enemies or avoid obstacles
* 32 : Autostart
* 64 : Start Inactive
* 128 : Fast Retire
* 256 : Out of Ammo
* 512 : Fade Corpse
* 1024 : Think outside PVS
* 2048 : Template NPC
: Will not spawn, used by [[npc_template_maker]] but '''not''' [[point_template]]
* 4096 : Do Alternate collision for this NPC (player avoidance)
* 8192 : Don't drop weapons
* 16384 : Ignore player push
: Don't give way to player


==Inputs==
== Outputs ==
{{I Targetname}}
{{O|OnDeploy|activator=NULL|Turret is becoming active and dangerous.}}
{{I Studiomodel}}
{{O|OnRetire|activator=NULL|Turret is becoming inactive and harmless.}}


==Outputs==
== See also ==
{{O Targetname}}
* [[npc_combine_camera]]
{{O Studiomodel}}
{{IO|OnDeploy|Turret is becoming active and dangerous.}}
{{IO|OnRetire|Turret is becoming inactive and harmless.}}


==See also==
[[Category:Half-Life 2 NPCs|T]]
*[[npc_combine_camera]]
 
[[Category:Half-Life 2 NPCs]]

Latest revision as of 07:33, 3 June 2025

English (en)Русский (ru)Translate (Translate)
C++ Class hierarchy
CNPC_CeilingTurret
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ npc_turret_ceiling.cpp

npc_turret_ceiling is a model entity available in Half-Life 2 series Half-Life 2 series.

Ceiling Turret

A Combine turret attached to the ceiling.

Rarely used in Half-Life 2, this turret deploys from the ceiling. Not to be confused with its cousin npc_combine_camera, or its siblings npc_turret_ground and npc_turret_floor. It has 1000 health by default and perfect accuracy, intended to be used as an "insta-kill" punishment/deterrent. For examples of its use, see the tripwire laser room in d3_c17_10b or the ammo-less turrets at the beginning of ep1_c17_00.

Icon-Bug.pngBug:This turret is partially broken and/or unfinished.
  • The looping engine sound can sometimes stay after being destroyed or retired.
  • The firing sound is missing, but the bullets flying past you still produce sounds.
  • The firing animation plays only on the first shot. This can be fixed by adding "Loop" to the firing sequences.
  • The firing animation while out of ammo plays sporadically.
  • The turret may have difficulty firing at enemies directly underneath it.
  • While the similarly built npc_combine_camera blends Deploy/Idle/Retract animations, this turret seems to be incapable of doing so, which causes the idle animation to jarringly snap into place. Even if the same nodes and transitions, or fadein/-out are used.
Cpp.pngCode Fix:If you have the source code, you can fix most of npc_turret_ceiling's bugs according to the fixes listed on this page.

Due to these bugs you might want to consider using npc_turret_floor as an alternative, as its equally as dangerous, but not as buggy and slightly more work to implement.

Note.pngNote:Some keyvalues, spawnflags, effect flags, inputs, or outputs might not affect an NPC, based on the functionality and coding of the NPC.

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

World Model (model) <model path> !FGD[ Edit ]
This entity's model is set to: models/combine_turrets/ceiling_turret.mdl on spawn so specifying this keyvalue will have no effect.

Flags

Efficient - Don't acquire enemies or avoid obstacles : [16]
Autostart : [32]
Start Inactive : [64]
Fast Retire : [128]
Out of Ammo : [256]

Outputs

OnDeploy
!activator = NULL
!caller = this entity
Turret is becoming active and dangerous.
OnRetire
!activator = NULL
!caller = this entity
Turret is becoming inactive and harmless.

See also