Author: Kronzky
Author Website:

Requirements: No addons required

Version: 2.1.0

Short description: Allows easy creation of randomly patrolling units, with improved AI behaviour.

Date: 2013-03-06 21:59

Comments: (3)


Urban Patrol Script

Allows easy creation of randomly patrolling units, with improved AI behaviour.

Copy the file ups.sqf into your respective mission folder. The mission folder is either at:
\My Documents\ArmA2\missions
\My Documents\ArmA2 Other Profiles\[profile name]\missions
To use the demo mission(s), copy them into the mission folder, and open one in the editor.

Setting up a scenario with this script requires only three basic steps:
  1. Position the player on the map.
  2. Create a rectangular marker over the area that should be patrolled (e.g. a city). Give this marker a name (e.g. "Alpha")
  3. Create as many units (or groups) as you find appropriate, and put the following call into the init field of each group leader:
    nul=[this,"Alpha"] execVM "ups.sqf"
  4. Play the mission!

Some of the features and advanced customization options that are available:
  • Setup Options:
      - Patrol any "marker-designated" area with any unit or group, whether it's Infantry, Armored, Cars, or Choppers, using any side (east, west, resistance, civilians).
      - Several independend marker areas (for different units) can be used on the same map. These areas can overlap.
      - The start position of the units can be a random position anywhere in the active area - in that case some units may even end up on roofs.
      - You can create a random number of "clones" of a unit/group you placed in the active area.
      - Patrolling units can be stopped or started at any time, and patrolling areas can be moved during the game.
  • AI Behaviour:
      - The AI will avoid "dangerous" areas, and react intelligently to attacks.
      - If it sees a team-member being shot, or spots an enemy without themselves being detected, it will not continue on its regular path, but instead use a flanking approach to get close to the shooter. The accuracy of the approach will depend on the "knowledge" the AI has about the shooter (i.e. whether the shooter was actually seen or only heard).(image)
      - If AI units get stuck (mostly due to bad pathfinding) they will try to free themselves after a while.
      - Units will make occasional stops of random lengths during their patrols.
      - Independent AI groups will share their knowledge about any enemies that have been spotted.
      - By default units patrol in "safe" mode at "limited" speed.
  • Intel Options:
      - A trigger can be generated for each patrolled area to announce when that area is cleared of enemies. (image)
      - The units can be tracked via a dynamic marker on the map. (image)
      - The marker that designates the active area can be hidden or displayed.

- On some maps enemies weren't recognized properly.
- Improved group cohesion when following enemies.
- Markers weren't visible when spawning clone groups.
- Improved roof positioning when using "RANDOM" or "RANDOMUP".

Forum topic:

External download:

Urban Patrol Script

Enable javascript to be able to download from Armaholic please!

Tags: Ai,   Patroll,   Random