Hi guys, i am trying to do a fairly simple script but am having difficulty detecting when a selected position has been reached.
At the moment i am making a heli take off and move to a given position that is selected from the map using the onmapsingleclick command. The given position creates a game logic at this location. What i am trying to do is once the helicopter detects it is within lets just say....... 10 metres from the game logic to force itself to land.
The problem is, when i use the distance command the helicopter never seems to force itself to land as with it being in the air it detects the distance vertically as being outside the range, what i really want it to do is just detect that it has reached the location horizontally on the map and land. My code to make the chopper move, is simple and listed as below, what would i add to this to finish it? Thanks in advance.
start script :
onMapSingleClick "([player11,_pos] exec 'land.sqs')";
land script :
_pos = _this select 1;
HeliLogic = "Logic" createVehicle [_pos select 0, _pos select 1, _pos select 2];
supplies move _pos;