arma3_missions/helotraining_mp.Altis/createEnemySquads.sqf

39 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

//diag_log format["createEnemySquad called, _this: %1", _this];
2016-07-24 22:11:44 +00:00
private _centrePos = _this select 0;
private _includeAA = _this select 1;
2016-07-24 22:11:44 +00:00
// Some variance
private _centreCoords = getPos _centrePos;
_centreCoords set [0, ((_centreCoords select 0) + enemyDistace + (floor random 100))];
_centreCoords set [1, ((_centreCoords select 1) + enemyDistace + (floor random 100))];
private _enemyPosition = _centreCoords findEmptyPosition [0,50];
// TODO: use some preconfigured fireteam setup
2016-07-24 22:11:44 +00:00
private _groupEnemy = createGroup east;
"O_Soldier_F" createUnit [_enemyPosition, _groupEnemy,"",0.6, "CORPORAL"];
"O_Soldier_F" createUnit [_enemyPosition, _groupEnemy,"",0.1, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_M_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
"O_soldier_AR_F" createUnit [_enemyPosition, _groupEnemy,"",0.3, "PRIVATE"];
if (_includeAA) then
{
2016-07-24 22:11:44 +00:00
"O_soldier_AA_F" createUnit [_enemyPosition, _groupEnemy,"",0.75, "CORPORAL"];
2016-07-24 21:05:39 +00:00
};
//diag_log format["createEnemySquad %1 positioned to %2", _groupEnemy, _enemyPosition];
2016-07-24 23:28:26 +00:00
[_groupEnemy]