Author: Igneous01
Author Website:

Requirements: No addons required

Version: 1.2

Short description: A script that will spawn random groups and group types, in random locations, that will also attack random locations

Date: 2011-08-03 15:47


Comments: (1)
Rating:



 

RUIS - Random Unit Invasion Script

by
Igneous01


Description:
This nifty little script is designed to spawn random groups of varying types that will spawn at random locations you define. And will move to and attack a random set of locations you also define. The script was designed with customization in mind, so mission makers can adjust the exact specifications of groups and group types to spawn, as well as the maximum amount of the groups to spawn (which will be selected randomly up to the maximum), and also change the percentage chance of that group type spawning. You can also adjust the amount of time the script will wait until the spawning of a new wave of units, as well as how many iterations the script will go through before ending. Whether you want to have 3 waves of random groups spawning, or endless waves - its now much easier to do so with this.


Features:
- Define areas where to spawn - a group will spawn at one of the randomly selected area's, making it easier to have waves of units come from different directions.
- Define areas where to attack - once a group has spawned, it will be assigned a move waypoint to attack a randomly selected position you define. You easily have 3 or 4 areas to defend with units pumping out and deciding where to assault - making for very random fights and size of forces
- Dynamic spawning, sometimes you might see a large wave of forces, other times you may only see 1 or 2 squads, sometimes it might be just infantry, other times it might be a combined arms assault - prepare for anything
- Define the maximum amount of groups to spawn of a single type - adjust how many groups will be spawned at maximum in a single wave of a group type - however the number will still be chosen randomly - from 0 groups to the maximum you defined
- Define the percentage chance of that type to spawn - from never to 100%, groups will spawn dependent on their chances of spawning that wave, making it easier to spawn tanks and vehicles, without flooding the battlefield with too many vehicles in an impossible fight.
- Define wave time - the script will wait after the first spawn until the specified time to spawn a new wave of units. I recommend atleast 300seconds (5 minutes) or more for fairly large pools of units.
- Cleans itself up, any dead units and empty groups will be deleted after a new wave has spawned to preserve performance
- execute the script from where ever you need to - whether you want it to start right away (init) or from a trigger later on, or another script, you decide when and where RUIS will start.
- All vanilla factions included- All the standard factions from Arma 2 and OA are already defined with groups, if you wish to add a custom group, there is a template inside the script that will let you set it up easily
- MP compatible


Installation / Usage:
Move to your mission folder.

After placing into mission folder, place atleast 1 unit down of the enemy side you wish to use for spawning. Name this unit something, and then you can call it using:
nul = [RUguy, [spawn1, spawn2, spawn3], [attackwp1, attackwp2], wavetime, Scripttime] execVM "RUIS.sqf"
where:
RUguy = the name of the unit you placed down in the editor (that units information will be used to select the proper faction and units
spawn (array) - gamelogics/markers/objects you wish to use as spawning points
attackwp (array) - gamelogics/markers/objects you wish to use as attack positions
wavetime - the amount of time until a new wave is spawned
scripttime - the amount of iterations (total waves) until the script completes itself

and then enjoy, settings can be modified inside the script (it is marked where you can edit)


Notes:
Be warned, this script is run server side, so spawning alot of units at a time can put alot some strain on servers (particularly listen servers) take care in deciding how many units to spawn to have steady performance and a good time


Credits & Thanks:
Demonized for helping me with deleting empty groups


Change log:
v1.2
- added mechanized type to spawn pool, motorized and mechanized are now separate types of groups

v1.0
- initial release


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: Groups,   Random,   Spawning