sergeziegler 10 Posted September 1, 2015 Hi! How do I delete in this case is Vehicle and Crew a group of drivers....example: _mkr = if (count _this > 0) then { _this select 0 } else { _exit = true };if (_exit) exitWith {}; _markpos = getMarkerPos _mkr; _marksize = getMarkerSize _mkr; _markrad = floor(sqrt((_marksize select 0)*(_marksize select 1))); _radius = if (count _this > 1) then { _this select 1} else { floor(_markrad*1.67); }; _parVeh = if (count _this > 3) then { _this select 3 } else { 5; }; _typerVeh = ["rhsusf_M1078A1P2_B_M2_wd_open_fmtv_usarmy","rhsusf_m998_w_4dr","rhsusf_m998_w_2dr","rhsusf_m1025_w_s","B_G_Offroad_01_armed_F","B_Truck_01_fuel_F","B_Truck_01_mover_F"];_GrpVeh = createGroup WEST;for "_x" from 1 to _parVeh step 1 do {_typeVeh = _typerVeh select (floor(random(count _typerVeh)));_rndPos = [_markpos,50,_radius,5,0,0.5,0,[],[]] call BIS_fnc_findSafePos; _unit33 = _GrpVeh createUnit [_typeVeh, _rndPos, [], 0, "NONE"];if (isNull _unit33) then {_unit33 = _typeVeh createVehicle _rndPos;createVehicleCrew _unit33;};(group _unit33) selectLeader _unit33;}; [_GrpVeh, (_markpos), (random(50)+75)] call BIS_fnc_taskPatrol;In this example, I was not able to remove. ???{deleteVehicle _x} forEach (crew _unit33); deleteVehicle _unit33; {deleteVehicle _x} forEach units _GrpVeh ; Share this post Link to post Share on other sites
sergeziegler 10 Posted September 1, 2015 Hi! How do I delete in this case is Vehicle and Crew a group of drivers.... example: _mkr = if (count _this > 0) then { _this select 0 } else { _exit = true };if (_exit) exitWith {}; _markpos = getMarkerPos _mkr; _marksize = getMarkerSize _mkr; _markrad = floor(sqrt((_marksize select 0)*(_marksize select 1))); _radius = if (count _this > 1) then { _this select 1} else { floor(_markrad*1.67); }; _parVeh = if (count _this > 3) then { _this select 3 } else { 5; }; _typerVeh = ["rhsusf_M1078A1P2_B_M2_wd_open_fmtv_usarmy","rhsusf_m998_w_4dr","rhsusf_m998_w_2dr","rhsusf_m1025_w_s","B_G_Offroad_01_armed_F","B_Truck_01_fuel_F","B_Truck_01_mover_F"]; _GrpVeh = createGroup WEST; for "_x" from 1 to _parVeh step 1 do { _typeVeh = _typerVeh select (floor(random(count _typerVeh))); _rndPos = [_markpos,50,_radius,5,0,0.5,0,[],[]] call BIS_fnc_findSafePos; _unit33 = _GrpVeh createUnit [_typeVeh, _rndPos, [], 0, "NONE"]; if (isNull _unit33) then {_unit33 = _typeVeh createVehicle _rndPos; createVehicleCrew _unit33;}; (group _unit33) selectLeader _unit33; }; [_GrpVeh, (_markpos), (random(50)+75)] call BIS_fnc_taskPatrol; In this example, I was not able to remove. ??? {deleteVehicle _x} forEach (crew _unit33); deleteVehicle _unit33; {deleteVehicle _x} forEach units _GrpVeh ; Share this post Link to post Share on other sites
rasmith1030 10 Posted September 2, 2015 Try this: {deleteVehicle _x} forEach (crew vehicle _unit33) + [vehicle _unit33]; I haven't ​tried it in exactly this form, but it should work. ​ Share this post Link to post Share on other sites
sergeziegler 10 Posted September 3, 2015 Hi! This your example does not work, I applied it today. Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted September 3, 2015 You better check your code line by line, because when I execute it, _unit33 is null even after the if(isNull _unit33) statement. Sorry, that I can't help you further for now, but I'm on the hop right now. Share this post Link to post Share on other sites
sergeziegler 10 Posted September 3, 2015 Hi! I did not want to open two issues, here's a link to the same question https://forums.bistudio.com/topic/184491-hi-how-do-i-delete-in-this-case-is-vehicle-and-crew-a-group-of-drivers/ Share this post Link to post Share on other sites