BIS fnc spawnGroup: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Talkingtoaj (talk | contribs) No edit summary |
||
Line 26: | Line 26: | ||
|p3= character details - Can be three different types: a list of character types ([[Array]]), an amount of characters to spawn ([[Number]]) or a [[CfgGroups]] entry ([[Config]]) |= | |p3= character details - Can be three different types: a list of character types ([[Array]]), an amount of characters to spawn ([[Number]]) or a [[CfgGroups]] entry ([[Config]]) |= | ||
|([[ | |p4= (optional) a list of relative positions ([[Array]]) |= | ||
| | |p5= (optional) a list of ranks ([[Array]]) |= | ||
| | |p6= (optional) skill range ([[Array]]) |= | ||
| | |p7= (optional) ammunition count range ([[Array]]) |= | ||
| | |p8= (optional) randomization controls ([[Array]]) 0: amount of mandatory units ([[Number]]) 1: spawn chance for remaining units ([[Number]]) |= | ||
| | |p9= (optional) azimuth/[[Direction]] ([[Number]]) |= | ||
| | |([[Group]]) |= Return value | ||
|x1= Spawn five random EAST units at aPos: | |x1= Spawn five random EAST units at aPos: |
Revision as of 16:05, 24 September 2010
Description
- Description:
- Function which handles the spawning of a dynamic group of characters. The composition of the group can be passed to the function. Alternatively a number can be passed and the function will spawn that amount of characters with a random type. A side's Center must have been created before a group may be spawned. Either by using createCenter or an editor placed (0% Probability of Presence is fine) unit of the appropriate side.
- Groups:
- Uncategorised
Syntax
- Syntax:
- [position, side, character details] call BIS_fnc_spawnGroup
- Parameters:
- position - group's starting position (Array)
- side - group's Side (Side)
- character details - Can be three different types: a list of character types (Array), an amount of characters to spawn (Number) or a CfgGroups entry (Config)
- (optional) a list of relative positions (Array)
- (optional) a list of ranks (Array)
- (optional) skill range (Array)
- (optional) ammunition count range (Array)
- (optional) randomization controls (Array) 0: amount of mandatory units (Number) 1: spawn chance for remaining units (Number)
- (optional) azimuth/Direction (Number)
- Return Value:
- (Group)
Examples
- Example 1:
- Spawn five random EAST units at aPos:
[getPos aPos, 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:
- Functions Library Arma 2 CfgVehicles
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