Using with groups:
Furthermore it’s possible to generate whole groups instead of single units. These units
can be renamed individually if one wants to define special things to them later. The
following script is used as an example only. In this script a group will be generated at the
position of the marker "GrpOneM". That marker has already been placed on the map.
GrpOne = Creategroup EAST;
_Leader="SquadLeaderE" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Sergant"];
_Unit2="SoldierEB" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
_Unit3="SoldierEB" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
_Unit4="SoldierEG" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
_Unit5="SoldierEMG" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
_Unit6="SoldierEAT" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
_Unit7="SoldierESniper" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
exit
As one can see, the first unit gets renamed as leader and she also is allocated a higher
rank. This unit will be the leader of the group. The name of the whole group is "GrpOne"
as well. To make sure that this group works correctly, read the following paragraph
carefully.