This page will guide you through adding the Onslaught module to your mission.
This module will spawn units and automatically give the units orders based on the spawn points tactic attribute. Mission creators can setup this module to have a constant stream of units fighting.
To add the module to your mission you will need to place down the Onslaught Init module into your mission. Then place down at least two Onslaught Spawn modules, making sure there is at least a single spawn module for both OPFOR and BLUFOR.
The Onslaught Init module has four attributes,
- BLUFOR Units
- This is the array of classnames that will be spawned for the BLUFOR side
- Maximum BLUFOR AI
- This is the maximum number of AI to spawn on the BLUFOR side in total, once a unit dies it will respawn at a random BLUFOR spawn point.
- OPFOR Units
- This is the array of classnames that will be spawned for the OPFOR side
- Maximum OPFOR AI
- This is the maximum number of AI to spawn on the OPFOR side in total, once a unit dies it will respawn at a random OPFOR spawn point.
Each Onslaught Spawn module can have it's own side and tactic assigned in the modules attributes. The side determines what side will spawn at that position, while tactics decides what the AI units do when they are spawned.
- Units will hold position at this spawn point, good for units who are attempting to hold a base or fortification.
- Units will be given a waypoint on a random enemy spawn point, useful for units who you want to attack a base or fortification.
The Onslaught Spawn modules need to be synchronized to the main Onslaught Init module for them to be seen as spawn points by the module. Spawning can be delayed by synchronizing the Init module to the trigger, module will be not activated until trigger is activated.
This module does not have any configuration files.
The AI will automatically start spawning and following the assigned tactic of their spawn point. Be aware that this module will run continuously, even if there are no players near-by, therefore it's advised to only use this module if it's the main part of the mission, or if you want a never ending onslaught on enemy units.
Unit spawning can be pasued/resumed by setting the vn_onslaught_running object variable to false/true:
module setVariable ["vn_onslaught_running", false];
Deletion of the module will stop the spawning script from running.