Jump to content

RolloTomassi

Member
  • Content Count

    7
  • Joined

  • Last visited

  • Medals

Posts posted by RolloTomassi


  1. Ok, i set now hint message in the script:

    hintC format ["troop - %1\n_Log - %2\n_Log dist troop - %3\nleader troop - %4",_troop,_Log,_Log distance leader _troop,leader _troop];

    The effect:

    troop - B 1-1-C
    _Log - <No group>:0
    _Log dist troop - 278.749
    leader troop - men2
    

    But the horizontal distance to the logic object is only 80~100 meters. Can the problem be the vertical position? The location of the group is in the hills.


  2. 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};

×