Npc turret floor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Classifying as model entity)
 
(35 intermediate revisions by 22 users not shown)
Line 1: Line 1:
{{wrongtitle|title=npc_turret_floor}}
{{LanguageBar}}
==Entity Description==
{{CD|CNPC_FloorTurret|base=CNPCBaseInteractive_CAI_BaseNPC|file1=1}}
[[Image:combine_turret_floor.jpg|frame|right|Floor Turret]]
[[File:combine_turret_floor.jpg|150px|right|Floor Turret]]


A three-legged turret, equipped with a weaker variant of an [[weapon_ar2|AR2]]. {{immobile npc}}
{{this is a|model entity|name=npc_turret_floor|game=Half-Life 2 series}}


It is unstable and falls over easily, but cannot be destroyed. It scans a 90 degree area, and will lock on to a target and fire at said target until it is out of range or can't be seen.  
It is unstable and falls over easily, but cannot be destroyed. It scans a 120 degree area, and will lock on to and fire at a target until that target goes is out of range or can't be seen.


If placed in a squad, it might share enemies with its squad.
When knocked over, the turret will fire randomly for a few seconds then disable (much like the [[npc_portal_turret_floor|floor turret from Portal]]). However, unlike the Portal turret, it will switch on again after being placed upright.


{{npcnote}}
== Playtips ==
*The player can pick up the turrets with ''+use'' key or with the [[Gravity Gun]]. While active, the turret will be hostile to zombies and {{ent|npc_headcrab}}. When held pointing away from player, will alert and take aim at enemies. 


==Keyvalues==
*Turrets can be carried through doorways and sometimes through level changes.
*{{kv basenpc}}


==Flags==
{{PlacementTip| If used in combat situations, this npc can add variety to a firefight and upgrade an enemy force's fire power}}
* 1 : Wait Till Seen
* 2 : Gag
:No IDLE sounds until angry
* 4 : Fall to ground
:Unchecked means *teleport* to ground
* 8 : Drop Healthkit
* 16 : Efficient - Don't acquire enemies or avoid obstacles
* 32 : Autostart
* 64 : Start Inactive
* 128 : Fast Retire
* {{ep1 add|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
* {{ep1 add|16384 : Ignore player push}}
: Don't give way to player


==Inputs==
{{NPCNote}}
*{{i basenpc}}
*{{i enabledisable}}
*'''Toggle'''
: Toggle this entity.


==Outputs==
== Keyvalues ==
*{{o basenpc}}
{{KV Targetname}}
* '''OnDeploy'''
{{KV|Model|intn=model|studio|Overrides the normal Combine Floor Turret model|nofgd=1}}
: Turret is becoming active and dangerous.
{{KV npc_turret_floor}}
* '''OnRetire'''
: Turret is becoming inactive and harmless.
* '''OnTipped'''
: Turret has been tipped over and is inactive.
* '''OnPhysGunPickup'''
: Picked up with physgun
* '''OnPhysGunDrop'''
: Released by physgun
==See Also==
* [[npc_turret_ceiling]]
* [[npc_turret_ground]]


{{otherlang:en}}
== Flags ==
{{otherlang:en:ru|Npc_turret_floor:ru}}
{{Fl npc_turret_floor}}


[[Category:Entities]][[Category:NPCs]]
== Inputs ==
{{I npc_turret_floor}}
 
== Outputs ==
{{O npc_turret_floor}}
 
== See also ==
* {{ent|npc_turret_ceiling}}
* {{ent|npc_turret_ground}}
* {{ent|npc_combine_camera}}
 
[[Category:Half-Life 2 NPCs|T]]

Latest revision as of 04:33, 19 May 2025

English (en)Русский (ru)Translate (Translate)
C++ Class hierarchy
CNPC_FloorTurret
CNPCBaseInteractive
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ npc_turret_floor.cpp
Floor Turret

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

It is unstable and falls over easily, but cannot be destroyed. It scans a 120 degree area, and will lock on to and fire at a target until that target goes is out of range or can't be seen.

When knocked over, the turret will fire randomly for a few seconds then disable (much like the floor turret from Portal). However, unlike the Portal turret, it will switch on again after being placed upright.

Playtips

  • The player can pick up the turrets with +use key or with the Gravity Gun. While active, the turret will be hostile to zombies and npc_headcrab. When held pointing away from player, will alert and take aim at enemies.
  • Turrets can be carried through doorways and sometimes through level changes.
PlacementTip.gifPlacement Tip: If used in combat situations, this npc can add variety to a firefight and upgrade an enemy force's fire power
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

Model (model) <model path> !FGD
Overrides the normal Combine Floor Turret model
Skin Number (SkinNumber) <integer>
Which skin to use for this turret. Set to 0 to select randomly.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Flags

Autostart : [32]
Unknown. Possibly deprecated.
Start Inactive : [64]
Causes this turret to start deactivated
Fast Retire : [128]
Makes this turret return to its dormant state faster after losing a target
Out of Ammo : [256]
Makes this turret unable to shoot at acquired targets
Citizen modified (Friendly) : [512] (in all games since Source 2007)
This turret will be allied with the player and use a special skin


Inputs

Enable
Disable
Toggle
Active/deactivate the turret's mechanisms.
Icon-Bug.pngBug:The Enable/Disable inputs have no effect while the turret is knocked over.  [todo tested in ?]
DepleteAmmo
RestoreAmmo
Depletes ammo from a turret, causing it to dry-fire, or restores ammo. Turrets never run out on their own.
Icon-Bug.pngBug:The DepleteAmmo/RestoreAmmo inputs have no effect on Portal turrets.  [todo tested in ?]
SelfDestruct  (in all games since Half-Life 2: Episode Two)
Emit a warning then self-destruct in a small explosion.


Outputs

OnDeploy
OnRetire
Turret has become active and dangerous or inactive and harmless.
OnTipped
Turret has been tipped over and is inactive.
OnPhysGunPickup
OnPhysGunDrop
Picked up/released by Gravity Gun or +use.


See also