Holden93 12 Posted March 16, 2014 (edited) Hi, this is the code _unitCount = 0; while {_unitCount < 7} do { hint format ["%1", _unitCount]; //debug _unitCount = _unitCount + 1; _randomSpawn = ["marker1", "marker2", "marker3", "marker4"] call BIS_Fnc_SelectRandom; _group = [getMarkerPos "_randomSpawn", EAST (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad")] call BIS_Fnc_spawnGroup; _group moveTo (getMarkerPos "avampost"); sleep 20; } The loop is not being executed, if I put the hint out of it it writes the exact value of _unitCount but if I put it inside it doesn't write anything. What's wrong with it? ---------- Post added at 08:00 ---------- Previous post was at 07:07 ---------- I fixed it, I forgot a comma after EAST, anyway the loop doesn't continue when it reaches _group moveTo, _unitCount always remains at 0 with and without the sleep command, why that? EDIT: Fixed this problem too, I wonder why moveTo and doMove are not working? _unitCount = 0; while {_unitCount < 7} do { _unitCount = _unitCount + 1; _randomSpawn = ["marker1", "marker2", "marker3", "marker4"] call BIS_Fnc_SelectRandom; hint format ["%1 %2", _unitCount, _randomSpawn]; _group = [getMarkerPos _randomSpawn, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad")] call BIS_Fnc_spawnGroup; _group move getMarkerPos "avampost"; sleep 20; }; Edited March 16, 2014 by Holden93 Updated code Share this post Link to post Share on other sites