Author: SirFlavalot
Author Website:

Requirements: No addons required

Version: 1.0

Short description: Spawns BLUFOR/OPFOR groups, with configuration parameters

Date: 2016-02-05 02:41


Comments: (0)
Rating:



 





AI Spawn Groups

by
SirFlavalot


Description:
This Arma 3 script spawns random groups in either a full circle, or in a half circle in any direction. The groups converge on your current location. It is super-easy to set up, perfect for beginners who just want to jump into the action and fight.


Installation / Usage:
Here's a an example placing you at the center of an epic battle!
1) Start Arma 3, click EDITOR, choose a map (e.g. Altis)
2) Press F1 to ensure you're in Units mode, then double-click on the map to place your soldier (Grid 060162 is really fun)
3) For INSERT UNIT parameters, choose SIDE: BLUFOR, FACTION: NATO, CLASS: MEN, and UNIT: Sharpshooter
4) In the INITIALIZATION box, put the following:
nul = ["b",9,25,90] execVM "spawn_groups.sqf"; nul = ["o",9,25,-90] execVM "spawn_groups.sqf";
5) Click OK, press CTRL-S save the map, give it a MISSION NAME of spawn_test, SAVE AS User mission, click OK. Don't run it yet!
6) Open Windows File Explorer and find your new mission folder, it will be named spawn_test.Altis. It should be located in either Documents/Arma 3/missions, or Documents/Arma 3 - Other Profiles/(yourprofilename)/missions
7) Put the spawn_groups.sqf file in the folder (it should already contain a single file named mission.sqm)
8) Go back to the Arma 3 Editor and click PREVIEW

That's it! You will now literally be in the middle of a huge battle between BLUFOR and OPFOR, both sides converging on your current location.

Watch for colored smoke, the script pops blue smoke at each BLUFOR spawn point, red at OPFOR. It also periodically deletes dead men & vehicles to help keep the frame rate up. A hint appears every time a new group is spawned, telling you what type & what count it is out of the total number.

That goofy text in step #4 is where all the magic happens. It contains two statements, the first calls our spawn_groups.sqf script to start a timer spawning BLUEFOR groups, the second does the same for OPFOR groups. Groups will be created roughly every 9 seconds, 25 groups total, with BLUEFOR in a semi-circle facing West, OPFOR in a semi-circle facing East. Since we did not pass in AI difficulty values, they default to random 0.1-0.25 (see parameter details below).

Groups spawned are chosen at random, either Infantry, Mechanized, or Motorized. Chances of Mechanized are 1 out of 11, Motorized 1 out of 4, otherwise Infantry.

Parameters you can pass in:
1) side (required): "o" for OPFOR, "b" for BLUFOR
2) # of seconds to sleep between group spawns (default = 20)
3) total # of groups to spawn, 0 = infinite (default)
4) rotation angle of troops on their half, 0 = full circle (default)
5) minimum AI skill level, 0-1 (default 0.1)
6) maximum AI skill level, 0-1 (default 0.25)

If you placed a Trigger named spawn_location somewhere on the map, units will spawn around it instead of the current player location.


Credits & Thanks:
This script is based on the Dynamic AI Spawn System by Lt.Killer(SAS) and Cpt.Killer(SAS), at http://www.armaholic.com/page.php?id=28107 - thanks guys!


Changelog:
v1.0
- first release




Enable javascript to be able to download from Armaholic please!



Tags: No tags