Hello, i have an problem with the "waituntil" command in my sqf script. It doesn´t works with distance command.
_troop = team1;
_mark = createMarker ["mark1",[0,0,0]];
mapclick = false;
onMapSingleClick """mark1"" setMarkerPos _pos; clickpos = _pos; mapclick = true; onMapSingleClick """";true;";
waituntil {mapclick};
_pos = clickpos;
_mark setMarkerColor "colorRed";
_mark setMarkerShape "icon";
_mark setMarkerSize [1,1];
_mark setMarkerDir 0;
_mark setMarkerType "hd_destroy";
_log = "logic" createVehicleLocal [0,0,0];
_log setPos _pos;
sleep 2 +random 3;
_wayp1 = _troop addwaypoint [_pos,1];
[_troop,1] setWaypointType "move";
[_troop,1] setWaypointPosition [position _log,0];
_troop setCurrentWaypoint [_troop,1];
hint "CHECK 1";
waituntil {leader _troop distance _log < 50};
hint "END of SCRIPT";
The last hint - "END of SCRIPT" wil not be reached. The problematic line is:
waituntil {leader _troop distance _log < 50};