Npc turret ceiling: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added fix to firing sequence bug. video of explanation can be found on that fixes page as well.)
(-added class hierarchy, cleanup)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{this is a|point entity|name=npc_turret_ceiling|game=Half-Life 2|game1=Half-Life 2: Episode One|game2=Half-Life 2: Episode Two|game3=Half-Life 2: Deathmatch}}
{{LanguageBar}}
{{CD|CNPC_CeilingTurret|file1=1}}
{{this is a|model entity|name=npc_turret_ceiling|game=Half-Life 2 series}}
[[File:combine_turret_ceiling.jpg|150px|right|Ceiling Turret]]
[[File:combine_turret_ceiling.jpg|150px|right|Ceiling Turret]]


Line 18: Line 20:
{{NPCNote}}
{{NPCNote}}


==Keyvalues==
== Keyvalues ==
{{KV Targetname}}
{{KV Targetname}}
{{KV Angles}}
{{KV Model|spawn model=models/combine_turrets/ceiling_turret.mdl}}
{{KV CBaseAnimating|no model=1|no solid=1|no sequence=1}}


==Flags==
== Flags ==
* 16 : Efficient - Don't acquire enemies or avoid obstacles
{{fl|16|Efficient - Don't acquire enemies or avoid obstacles}}
* 32 : Autostart
{{fl|32|Autostart}}
* 64 : Start Inactive
{{fl|64|Start Inactive}}
* 128 : Fast Retire
{{fl|128|Fast Retire}}
* 256 : Out of Ammo
{{fl|256|Out of Ammo}}


==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==
*[[npc_combine_camera]]


[[Category:Half-Life 2 NPCs|T]]
[[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