Npc metropolice: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) mNo edit summary |
m (Robot: fixing template case.) |
||
Line 60: | Line 60: | ||
==Flags== | ==Flags== | ||
* {{ | * {{Fl BaseNPC}} | ||
;Simple cops (131072) | ;Simple cops (131072) |
Revision as of 19:21, 19 January 2009
Combine "police" officers are officially known as Civil Protection, which is often shortened by citizens to CP. They can carry a stunstick, pistol or SMG as a primary armament, and can carry a deployable manhack on their shoulder.
They can be set to guard an area from intrusion with ai_goal_police.
If a metrocop is armed with an SMG and the player is in the airboat, he can "stitch" by shooting a meandering, closing path of bullets into the water in front of the vehicle.
With the Efficient flag (16) set, the policeman's model is set to Police_Cheaple.mdl.
Dedicated Console Variables
sk_metropolice_health
- <integer> A metrocop's spawn health. Affected by the Gordon pre-criminal global state.
sk_metropolice_stitch_reaction
- <integer> How close to the airboat should Metrocops begin stitching?
sk_metropolice_stitch_at_hitcount
- <integer> Number of times a stitching Metrocop can hit a nearby player.
sk_metropolice_stitch_behind_hitcount
- <integer> Number of times a stitching Metrocop can hit a player looking at it.
sk_metropolice_stitch_tight_hitcount
- <integer> Number of times a stitching Metrocop can hit a player from behind.
sk_metropolice_stitch_along_hitcount
- <integer> Number of times a stitching Metrocop can hit a player looking left/right.
See also
Keyvalues
- waitingtorappel
- <boolean> If set, this NPC spawns suspended in air and awaits a BeginRappel input. It will then spawn a zipline and slide down. When it hits the ground, NPC will cut away the line and try to move forward a few feet to make room for the next NPC. The NPC will not attempt to clear its landing space if it cannot do so by taking a few steps forward.
- additionalequipment
- <choices>
Literal Value Description weapon_pistol Pistol weapon_smg1 SMG1 weapon_stunstick Stun Stick weapon_shotgun Shotgun 0 Nothing
- manhacks
- <integer> Number of manhacks.
- weapondrawn
- <boolean> Pistol starts active.
Flags
BaseNPC flags
- Wait Till Seen : [1]
- Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
- Gag : [2]
- Won't make IDLE sounds until it's angry.
- Fall to ground (unchecked means teleport to ground) : [4]
- Drop Healthkit : [8]
- Causes this NPC to drop an item_healthvial upon dying.
- Efficient : [16]
- Don't acquire enemies or avoid obstacles
- Wait For Script : [128]
- Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
- Long Visibility/Shoot : [256]
- By default, increases a NPC's sight range to
6,000
units and allows it to attack from anywhere within that distance.
- Fade Corpse : [512]
- Think outside PVS : [1024]
- Allows this NPC to run its regular AI outside of any player's PVS.
- Template NPC : [2048]
- Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
- Do Alternate collision for this NPC (player avoidance) : [4096]
- Don't drop weapons : [8192]
- Ignore player push : [16384] (in all games since
)
- Entity won't give way to player.
- Simple cops (131072)
- Cheap model, basic AI
- Always stitch (524288)
- If the metrocop is armed with an SMG and the player is in the airboat, shoot a meandering, closing path of bullets into the water in front of it.
- Metrocops may still decide to do this without the flag.
- No chatter (1048576)
- Gags the NPC, additionally preventing some metrocop-specific speech that gagging itself doesn't.
- Arrest enemies (2097152)
- Allows the cop to kill people and the player, without hating them.
- No far stitching (4194304)
- Stops stitching if the player is over 6000 units away. (Is that in inches?)
- Prevent manhack toss (8388608)
- Don't use my manhack. See the EnableManhackToss input.
- Allowed to respond to thrown objects (16777216)
- The officer can chase players who have annoyed them. Does not override the settings of an
ai_goal_police
. - Mid-range attacks (halfway between normal + long-range) (33554432)
- Change the metrocop's preferred attack distance.
Inputs
- BeginRappel
- EnableManhackToss
- Enables manhack toss (which had been disabled by the spawnflag).
- SetPoliceGoal <target_destination>
- Causes the NPC to police the area defined by an ai_goal_police.
- ActivateBaton
- Set the baton to active.
Outputs
- OnRappelTouchdown
- Fires when done rappeling.
- OnStunnedPlayer
- Fires when the player is hit by a stun stick by this NPC.