Author: Engima
Author Website:

Requirements: No addons required

Version: 1.7

Short description: adds dynamic traffic (civilian and/or military) to any map with roads.

Date: 2019-09-25 09:57

Comments: (5)


Engima's Traffic

Engima of Östgöta Ops

Script that adds dynamic traffic (civilian and/or military) to any map. Vehicles are spawned in out of sight for the player(s) and are removed again when they get at a certain distance.

You can customize traffic by editing the file Engima/Traffic/ConfigAndStart.sqf. Customizable parameters are side, vehicle classes, amount of vehicles, spawn distances, crew's skill, map area, and you can also add callbacks that fire when vehicles are spawning and being removed.

Works in SP, MP, Dedi and JIP.

Also released as CPack "Engima.Traffic" for the TypeSqf Editor.

1. Copy folder "Engima" to root of your mission folder.
2. Create the file "init.sqf" in your mission folder (if you don't already have it). Add the following line to the top of the init.sqf:
call compile preprocessFileLineNumbers "Engima\Traffic\Init.sqf";
3. Customize the traffic behavior in the file "Engima\Traffic\ConfigAndStart.sqf".

Documentation and a complete reference of customization parameters can be found in file "Engima\Traffic\Documentation.txt";

Here is an example of how to initialize the traffic in the file Engima/Traffic/ConfigAndStart.sqf:
// Set traffic parameters.
_parameters = [
	["SIDE", east],
	["VEHICLES", ["O_MRAP_02_F", "O_Quadbike_01_F", "O_Truck_02_transport_F"]],
	["MIN_SKILL", 0.4],
	["MAX_SKILL", 0.6],
	["AREA_MARKER", "EnemyMarker1"],
	["HIDE_AREA_MARKER", true],
	["ON_UNIT_CREATING", { true }],
	["DEBUG", false]

// Start an instance of the traffic
_parameters spawn ENGIMA_TRAFFIC_StartTraffic;

You may create more than one instance of the script, if you want different kinds of traffic with different behavior. See the documentation for how that is done.

How to update from older version:
1. Back up your own customization file (Engima\Traffic\ConfigAndStart.sqf).
2. Replace the folder Engima\Traffic with the corresponding folder in the download package.
3. Replace the original ConfigAndStart.sqf with your own ConfigAndStart.sqf that was backed up in step 1.

1. Open the CPack console and run command "update Engima.Traffic".

Change log:
- Fixed: The same car had different random texture on different clients. Now all players see the same texture on all cars.
- Fixed: Script error when no players are in the mission

- Adjusted vehicle spawn distances.
- Improved traffic flow by removing immobile vehicles outside visual range.
- Fixed: Many traffic units not moving at all on maps with several small islands (like Tanoa).
- Fixed: Units get stuck on small paths in the woods (like on Tanoa). Paths are now ignored.
- Fixed: Number of vehicles not relative to traffic area coverage in some cases.
- Added callback ON_UNIT_CREATING which fires right before a vehicle spawns.
- Replaced callback ON_SPAWN_CALLBACK with ON_UNIT_CREATED.
- Fixed: Vehicles tend to spawn more often behind the players than ahead of them.
- Added support for headless client.
- Script no longer tries to terminate scripts executed in spawn callback.

- Possibility to select areas (markers) where the traffic will be.
- Better performance on large maps (like Altis).

- First version published on

Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!