Home   Help Search Login Register  

Author Topic: Generate a Group?  (Read 2772 times)

0 Members and 1 Guest are viewing this topic.

Offline stephen271276

  • Members
  • *
Generate a Group?
« 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...
« Last Edit: 18 Sep 2009, 13:35:10 by stephen271276 »

Offline celoush

  • Members
  • *
  • Lazy czech mission designer
    • My czech website about mission design
Re: Generate a Group?
« Reply #1 on: 14 Sep 2009, 18:11:30 »
Code: [Select]
0 spawn {
_group = createGroup east;
for "_i" from 1 to 30 do {
_unit = _group createUnit ["MVD_Soldier", Position player, [], 30, "FORM"];
sleep 0.1;
};

Offline Pirin

  • Members
  • *
Re: Generate a Group?
« Reply #2 on: 16 Sep 2009, 08:49:43 »
You can use the Functions module and BIS_fnc_spawnGroup as well, as shown here:

Create a 30 man group:
Code: [Select]
_newGroup = [_pos, _side, 30] call BIS_fnc_spawnGroup;
http://forums.bistudio.com/showpost.php?p=1325686&postcount=26

Offline stephen271276

  • Members
  • *
Re: Generate a Group? SOLVED
« Reply #3 on: 18 Sep 2009, 13:34:55 »
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?

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Re: Generate a Group?
« Reply #4 on: 19 Sep 2009, 02:04:46 »
I would try and make it a script instead.