npc_metropolice
Jump to navigation
Jump to search
Code classes:
CNPC_MetroPolice
CAI_BaseActor
CAI_BaseNPC
(NPCs)CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
(models)CBaseEntity
(all ents)
npc_metropolice
is a point entity present in the Half-Life 2 series. City 17's police force. Civil Protection's ground units are anonymous both in face and in voice; anyone could have beat your friend, and also no one did. These hollow husks of the former dominant species are Gordon's first sign of Earth's fate upon his arrival. Metrocops, when not killing someone, stare deadly at the world they betrayed, only lashing out if someone's bugging them.
ConVars/Commands[edit | edit source]
ConVar/Command | Parameters or default value | Parameter Type | Effect |
---|---|---|---|
metropolice_chase_use_follow | 0 | 0 disables, 1 enables | Causes pre-criminal npc_metropolice with stunsticks to follow the player indefinitely. |
metropolice_charge | 1 | 0 disables, 1 enables | Sets whether npc_metropolice with pistols charge at the player. |
sk_metropolice_health | 40 | health amount | npc_metropolice health when spawned. |
sk_metropolice_simple_health | 26 | health amount | npc_metropolice health when the Simple cops flag is checked. |
sk_metropolice_stitch_distance | 1000 | hammer units | Distance at which npc_metropolice will begin to attempt stitching. (See Always stitch flag.) |
Flags[edit | edit source]
- 131072: Simple cops - Sets health to 26 instead of 40, uses more dramatic flinch animations when hurt.
- 262144:
Rappel (UNCHECK THIS IF IT IS CHECKED!)- No longer exists in code.
- 524288: Always stitch - If the npc_metropolice is armed with an SMG and the player is beneath them, they'll shoot a meandering, closing path of bullets (like the first metrocop in
d1_canals_07
). Metropolice can only stitch if the player is in an airboat, unless this flag is checked.
- 1048576:
No chatter- Doesn't do anything except add the Gag flag. (Does affect an unused schedule, though.)
- 2097152: Arrest enemies - Enemies are "arrested". Demonstration Video.
- 4194304: No far stitching - Stops stitching if the player is over 6000 units away. (For reference, that's about the distance between the two forcefields on the bridge in
d2_coast_07
, so quite far away.)
- 8388608: Prevent manhack toss - Does not allow manhack deployment (which is allowed by default, if the metrocop is carrying any manhacks). Deploying them can be allowed with EnableManhackToss.
- 16777216: Allowed to respond to thrown objects - If the metrocop is carrying a stunstick, is not in a script, and gets something thrown at them, allow them to chase and hit the player. If the metrocop is unable to respond for any of these reasons, one that can and is nearby will.
- 33554432: Mid-range attacks (halfway between normal + long-range) - Tells the metrocop it does not prefer extreme long range combat (3500 units).
Keyvalues[edit | edit source]
- Pistol starts drawn
(weapondrawn)
<boolean>
- Spawns the metrocop with the pistol in hand. Other weapons always spawn in hand.
- Number of Manhacks
(manhacks)
<integer>
- How many manhacks the metrocop has on him. By default, metrocops deploy them at will.
Inputs[edit | edit source]
- EnableManhackToss
- Unchecks Prevent manhack toss.
- SetPoliceGoal
<target_destination>
- Tells the metrocop to guard an area defined by the specified
ai_goal_police
. - ActivateBaton
<boolean>
- Seems to be bugged. Can only do one thing: If the player has annoyed the metrocop enough for them to silently flick their stunstick on and moves out of his personal bubble (128 unit radius), the metrocop will shut the stunstick off immediately.
Outputs[edit | edit source]
- OnCupCopped
- Fires if a
CBaseProp
namedcupcop_can
hits the metrocop (has to be be thrown by the player with their hands or gravity gun). - OnStunnedPlayer
- Fires when the metrocop whacks the player.