[BETA] AIRS - AI Respawn System
This script pack makes AI group to respawn on defined marker(s) after spawning delay and sends it for its task. It's group based, so spawning delay starts running after whole group is dead. It's ment for multiplayer missions, but can also be used for SP.
Works with vehicles too, and has option to set air group to spawn on air or land. Includes simple cleanup script for multiplayer, there's multiple preset tasks you can set for the group and it's quite simple to make your own ones too.
It uses few familiar BIS functions which I've modified a bit to suit better on this (BIS_fnc_taskDefend, BIS_fnc_taskPatrol, BIS_fnc_spawnGroup, BIS_fnc_spawnVehicle).
How to use:
Extract AIRS.rar into your mission folder. You should have there now 2 folders; LV and AIRS.
Create init.sqf in your mission folder and paste in it:
Create AI group and set to its leaders init field:
nul = [this,[target,style],lifes,base,delay,air] execVM "AIRS\addAIgroupToPool.sqf";
Adjust this calling line with these rules:
- target - Target object, marker or position, eg: "targetMarker"
- style - Style/Task, current templates:
- "attack" - Team attacks to target (using BIS_fnc_taskAttack).
- "defend" - Team goes and defends the target (using possible static weapons etc). Modified version of BIS_fnc_taskDefend (faster movement and removed sitting!).
- "patrol" - Team patrols around target (using modified BIS_fnc_taskPatrol (faster movement)).
- "building" - Team will go patrol inside nearest building (which has buildingPos') from the target.
- "buildings" - Team units will patrol individually in all buildings in 100m from target.
- "waypoint" - Team uses waypoint to move to target. As default the waypoint is set up as "SAD" "AWARE" "RED" "FULL". (You can edit this in AIRS\startAItask.sqf)
- "domove" - Team will move to target using doMove command.
- lifes - How many times group will respawn (0 = unlimited). DEFAULT: 0
- base - Spawn marker or array of markers for the group. Use "original" if you want group to respawn to its original spawn position. If array is used, selected marker is picked from it randomly. DEFAULT: "respawn_west" / "respawn_east" / "respawn_guerrila"
- delay - Spawning delay for the group. If not defined, script will use AIRS_respawn_delay which is defined in AIRS\AIrespawnInit.sqf. DEFAULT: AIRS_respawn_delay (25s)
- air - Ment for air vehicles, so if group has air vehicles and this is set to true, they will spawn flying, otherwise at land. DEFAULT: false
nul = [this,["mainTarget","attack"],0,"original"] execVM "AIRS\addAIgroupToPool.sqf";
(Includes example mission)
More precise and detailed information: Documentation
Most of the files are in AIRS folder, but this pack also includes temporarily LV folder since it uses few functions from AISSP and I'm not 100% sure yet if I should include this to AISSP or keep it separated. LV folder includes AISSP 0.81 files with modified LV_fnc_removeDead.sqf, so if you want to combine these script packs, you should ask some more info how to do it the easy way. With AISSP 0.80 there's no conflicts.
This should suit very well for Conquest type coop missions, but why not for others too.
I hope you'll find it usefull! :)