I was bothered that there is no ambient air traffic in Arma (with all the ambient cars, animals and people), so I scripted my own. I'll release it here in the hope that it might be useful.
How to use it
The script is called in init.sqf like this:
_minTime and _maxTime define an interval denoting the minimum and maximum time between spawns (randomly chosen). Likewise, _minAlt and _maxAlt give minimum and minimum altitude for the spawns. _vehicleList is a list of planes or choppers; one is picked randomly each time the time interval is hit. _playerGroup is the group around which the planes should be spawned, and _spawnDistance gives the distance to the spawn location.
The script generates a timeout between _minTime and _maxTime, and then creates a randomly chosen vehicle from the list between _minAlt and _maxAlt at _spawnDistance from the player group's leader. The plane will then fly towards the player (+- 45 °) and desspawn when it reaches _spawnDistance from the player again.
Example
The example spawns a plane from the list at intervals of 3 to 5 minutes, at an altitude of 100 to 400 meters, 3500 meter away from the leader of FHQ_playerGroup
How to use it
The script is called in init.sqf like this:
Code:
[ _minTime, _maxTime, _minAlt, _maxAlt, [_vehicleList], _playerGroup, _spawnDistance] execvm "fhq_randomAirTraffic.sqf";
_minTime and _maxTime define an interval denoting the minimum and maximum time between spawns (randomly chosen). Likewise, _minAlt and _maxAlt give minimum and minimum altitude for the spawns. _vehicleList is a list of planes or choppers; one is picked randomly each time the time interval is hit. _playerGroup is the group around which the planes should be spawned, and _spawnDistance gives the distance to the spawn location.
The script generates a timeout between _minTime and _maxTime, and then creates a randomly chosen vehicle from the list between _minAlt and _maxAlt at _spawnDistance from the player group's leader. The plane will then fly towards the player (+- 45 °) and desspawn when it reaches _spawnDistance from the player again.
Example
Code:
[
 180, 300,
 100, 400,
 ["L39_TK_EP1", "L39_TK_EP1", "L39_TK_EP1", "Su25_TK_EP1", "Su25_TK_EP1", "Su25_TK_EP1", "Su25_TK_EP1", "Su25_TK_EP1"],
 FHQ_playerGroup,
3500] execVM "fhq_randomAirTraffic.sqf";
The example spawns a plane from the list at intervals of 3 to 5 minutes, at an altitude of 100 to 400 meters, 3500 meter away from the leader of FHQ_playerGroup