OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: stephen271276 on 14 Sep 2009, 17:42:31
-
Is there an easy way to Generate a group of varied soldiers? This is for a mission Im making which will have a reinforcements option via radio. Would also help if they would spawn about 30 metres behind the player...
-
0 spawn {
_group = createGroup east;
for "_i" from 1 to 30 do {
_unit = _group createUnit ["MVD_Soldier", Position player, [], 30, "FORM"];
sleep 0.1;
};
-
You can use the Functions module and BIS_fnc_spawnGroup as well, as shown here:
Create a 30 man group:
_newGroup = [_pos, _side, 30] call BIS_fnc_spawnGroup;
http://forums.bistudio.com/showpost.php?p=1325686&postcount=26 (http://forums.bistudio.com/showpost.php?p=1325686&postcount=26)
-
Pirin,
How exactly does that work? Do I have to download something or is it already part of the program? Sorry for noob questions.... Basically what Im asking is can I put that code in the init line of a trigger or WP?
-
I would try and make it a script instead.