BIS_fnc_spawnGroup
Jump to navigation
Jump to search
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- Parameters:
- position: Position - group's starting position
- side: Side - group's side
- toSpawn - Can be one of:
- relPositions: Array of Positions (Optional, default []) a list of relative positions
- ranks: Array of Strings/Numbers - (Optional, default []) ranks (see BIS_fnc_setRank) - must be same size as toSpawn's array
- skillRange: Array of Numbers - (Optional, default []) skill range format [min, max]
- ammoRange: Array of Numbers - (Optional, default []) ammunition range (0..1) format [min, max]
- randomControls: Array of Numbers - (Optional, default [-1, 1]) to format [minUnits, chance]:
- azimuth: Number - (Optional, default 0) azimuth/direction
- precisePos: Boolean - (Optional, default true) forces precise position placement
- maxVehicles: Number - (Optional, default 10e10) vehicle number limit
- Return Value:
- Return value needed
Examples
- Example 1:
- Spawn five random EAST units at aPosition:
[getPos aPosition, east, 5] call BIS_fnc_spawnGroup;
- Example 2:
- Spawn a Stryker MGS Platoon at marker "tankSpawn":
[getMarkerPos "tankSpawn", side player, (configFile >> "CfgGroups" >> "West" >> "BIS_US" >> "Armored" >> "US_MGSPlatoon")] call BIS_fnc_spawnGroup;
- Example 3:
- Spawn a TK Militia Medic and Soldier at aPos facing south:
[getPos aPos, east, ["TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on August 23, 2016 - 02:42 (UTC)
- Snake Plissken
-
Sides are as follow:
- west/blufor = BLUFOR
- east/opfor = OPFOR
- resistance/independent = INDEPENDENT
- civilian = CIVILIAN.
Group_Name_Here = [getMarkerPos "MARK1", WEST, ["B_G_Soldier_A_F", "B_G_Soldier_F", "B_G_Soldier_AR_F", "B_G_Soldier_LAT_F"]] call BIS_fnc_spawnGroup;
Or a random group OPFOR of seven unitsGroup_Name_Here= [getMarkerPos "MARK1", EAST, 7] call BIS_fnc_spawnGroup;
an independent group:Group_Name_Here = [getMarkerPos "MARK1", INDEPENDENT, ["I_G_Soldier_A_F", "I_G_Soldier_F", "I_G_Soldier_AR_F", "I_G_Soldier_LAT_F"]] call BIS_fnc_spawnGroup;
- Posted on August 2, 2017 - 19:06 (UTC)
- Cheitan
- When using this function for making a dynamic AI spawn, pay attention to the fact that none of the created groups will be marked for auto-deletion when the group become empty (all members dead). It means that it can be very easy to hit the 144 (288 for A3) max groups per side limitation, implying that no more AI or group can be created afterwards. To avoid this issue on Arma 3, don't forget to use deleteGroupWhenEmpty command in your script.