Combine Police Policing

- By Limpet
This tutorial was submited on Dec 23, 2005.

First off, let me show you my layout.



As you can see I have place env_global, logic_auto, npc_metropolice, and ai_goal_police entities in the map.

Env_Global (Optional)

This entity can be used to set a basic level of behavior for the npc_metropolice entities. When the Global State Gordon Pre-Criminal is set, the npc_metropolice entities will only push you when you get too close and chase you when you throw objects at them. This is how they are set in the beginning levels of Half-Life. When Gordon Pre-Criminal is not set then the npc_metropolice entities will give you 3 warnings then chase you for a bit before returning to their original location.

Logic_auto

This is the entity used to make the npc_metropolice entity begin policing when the map starts.

Use these outputs:

My output named: OnMapSpawn
Targets entities named: (your npc_metropolice entity)
Via this input: SetPoliceGoal
With a parameter override of: (name of your ai_goal_police entity)

Npc_metropolice

This is the actual entity that will be policing. A couple things to note about this entity:

Notice how in the picture that the npc_metropolice entity is not standing on the ai_goal_police entity. When the npc_metropolice entity receives the SetPoliceGoal input properly it will walk to where the ai_goal_police entity is.

Also note that you can set specific behaviors about the entity directly while the ai_goal_police can set others.

Ai_goal_police

This is the entity which sets the area for the npc_metropolice to police. If the target gets near the radius of the ai_goal_police entity the npc_metropolice entity will issue verbal warnings but not take action. When the target enters the radius the npc_metropolice will act according to the behaviors that have been set by the ai_goal_police and itself.

There are other ways to tell an npc_metropolice to start policing. For example, you could set up a trigger_mulitple (or single) and use a similar output to the one used by the logic_auto. Really, any entity that is capable of sending an output can work.

Download the example map (1.48KB) and see it yourself.



Still need help? Ask your questions in one of our HELP FORUMS
Post A Comment
Name:
Email: Links Not Allowed In Comments
Comment:
What is the capital of France? Need Help?
Comments
tartor - Dec 22, 2009
dosnt seem to work i do the exact same but nothing the cop shoots at me instead of standin ther :(
IRON_FIST - Feb 3, 2007
nice tutorial! :D
All original content ©2006 EditLife.net. All Rights reserved. All files property of their rightful owners.
Get Firefox! Get Thunderbird! Get Notepad++!