coolfact 10 Posted October 31, 2014 The overall situation is that I have built a GUI where I can add three inputs, to a map marker script, containing following while loop: while {?????} do // { _Name setMarkerPosLocal [(getPos leader _grp select 0),(getPos leader _grp select 1)]; sleep 6; }; now lets say I'm not happy with my input choice, and want to change them, then I am running the same script, which makes another marker(now I have two markers), so my problem is how can I break the first script "while loop", while still running the second one? Share this post Link to post Share on other sites
jshock 513 Posted October 31, 2014 You will need an if exitWith check in the while loop, something like this: //Psuedo code while {blah} do { //code if (isNull _marker) exitWith {}; }; Share this post Link to post Share on other sites
dreadedentity 278 Posted October 31, 2014 spawn, terminate loop1 = [] spawn { while {true} do { }; }; loop2 = [] spawn { while {true} do { }; }; //now you decide you don't want to use loop1 anymore terminate loop1; Share this post Link to post Share on other sites
coolfact 10 Posted November 1, 2014 thanks for the advice guys Share this post Link to post Share on other sites
venilsonribeiro 0 Posted January 16, 2016 my problem exit this loop intro and back game titlecut [" ","BLACK IN",3]; _camera = "camera" camcreate [0,0,0]; _camera cameraeffect ["external", "front"]; showCinemaBorder true; while {true} do { _aliveCount = count allUnits; _aliveSelect = _aliveCount - 1; _randomSelect = round random _aliveSelect; _newTarget = allUnits select _randomSelect; _camera camsettarget _newTarget; _randomX = (random 6); _randomY = (random 6); _camera camsetrelpos [_randomX,_randomY,4]; _camera camcommit 0; sleep (3+ (random 6)); }; Share this post Link to post Share on other sites