npc_turret_ceiling

From Valve Developer Community
Jump to navigation Jump to search
English (en)Русский (ru)Translate (Translate)
Class hierarchy
CNPC_CeilingTurret
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
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