Npc turret ceiling: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(-added class hierarchy, cleanup)
 
(51 intermediate revisions by 24 users not shown)
Line 1: Line 1:
{{basicnpc/img|name=npc_turret_ceiling|image=combine_turret_ceiling.jpg|caption=Ceiling Turret|desc=A Combine turret attached to the ceiling. Rarely used in [[Half-Life 2]] (if at all), in favor of its cousin [[npc_combine_camera]]}}.
{{LanguageBar}}
==See Also==
{{CD|CNPC_CeilingTurret|file1=1}}
* [[npc_turret_ground]]
{{this is a|model entity|name=npc_turret_ceiling|game=Half-Life 2 series}}
* [[npc_turret_floor]]
[[File:combine_turret_ceiling.jpg|150px|right|Ceiling Turret]]
 
A [[Combine]] [[turret]] attached to the ceiling. {{immobile npc}}
 
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>.
 
{{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}}
 
== Keyvalues ==
{{KV Targetname}}
{{KV Model|spawn model=models/combine_turrets/ceiling_turret.mdl}}
 
== Flags ==
{{fl|16|Efficient - Don't acquire enemies or avoid obstacles}}
{{fl|32|Autostart}}
{{fl|64|Start Inactive}}
{{fl|128|Fast Retire}}
{{fl|256|Out of Ammo}}
 
== Outputs ==
{{O|OnDeploy|activator=NULL|Turret is becoming active and dangerous.}}
{{O|OnRetire|activator=NULL|Turret is becoming inactive and harmless.}}
 
== See also ==
* [[npc_combine_camera]]
* [[npc_combine_camera]]
[[Category:Entities]][[Category:NPCs]]
 
[[Category:Half-Life 2 NPCs|T]]

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