Ok. Thanks i go test this and then try to use this im my files

ok i need to look a the code some time and make the connections i need to understand it some more
so i can use this in a easy way
im not new NEW to scripting
but i learn it from scrap .
and to understand the code is not that simple :
Edit
ok so this for "_groupsize" from 0 to 4 do tells the server to create 5 ai soldiers ?
and is there a way to make the static guns always spawn with ai on it
now i use this
_unit_27 = objNull;
if (true) then
{
_this = _group_2 createUnit ["gsc_eco_stalker_mask_fred", [22881.412, 19841.514, 14.264023], [], 0, "CAN_COLLIDE"];
_unit_27 = _this;
_this setDir -153.9915;
_this setVehicleInit "this moveingunner M2";
_this setUnitRank "MAJOR";
_this setUnitAbility 1;
if (true) then {_group_2 selectLeader _this;};
};
_group_5 = createGroup _center_0;
_vehicle_15 = objNull;
if (true) then
{
_this = createVehicle ["M2StaticMG", [22335.965, 19677.496, 23.536039], [], 0, "CAN_COLLIDE"];
_vehicle_15 = _this;
_this setDir 43.467625;
_this setVehicleVarName "M4";
M4 = _this;
_this setPos [22335.965, 19677.496, 23.536039];
};
and not all the time the ai spawn on the guns
most time they drop death behind the gun
and all the ai are the same with the same m2 gun
Thanks
ok i need to look a the code some time and make the connections i need to understand it some more
so i can use this in a easy way
im not new NEW to scripting
but i learn it from scrap .
and to understand the code is not that simple :
Edit
ok so this for "_groupsize" from 0 to 4 do tells the server to create 5 ai soldiers ?
and is there a way to make the static guns always spawn with ai on it
now i use this
_unit_27 = objNull;
if (true) then
{
_this = _group_2 createUnit ["gsc_eco_stalker_mask_fred", [22881.412, 19841.514, 14.264023], [], 0, "CAN_COLLIDE"];
_unit_27 = _this;
_this setDir -153.9915;
_this setVehicleInit "this moveingunner M2";
_this setUnitRank "MAJOR";
_this setUnitAbility 1;
if (true) then {_group_2 selectLeader _this;};
};
_group_5 = createGroup _center_0;
_vehicle_15 = objNull;
if (true) then
{
_this = createVehicle ["M2StaticMG", [22335.965, 19677.496, 23.536039], [], 0, "CAN_COLLIDE"];
_vehicle_15 = _this;
_this setDir 43.467625;
_this setVehicleVarName "M4";
M4 = _this;
_this setPos [22335.965, 19677.496, 23.536039];
};
and not all the time the ai spawn on the guns
most time they drop death behind the gun
and all the ai are the same with the same m2 gun
Thanks
Last edited: