Hello everyone,
I am trying to make a heli mission where there's a couple of spawnpoints (via markers) for a downed heli where the crew needs to be saved from.
So right now, there are three markers, which the script will randomly pick one, place the heli there and set a waypoint. This I got to work, but, it will not work when sitting inside a heli. As soon as I enter the heli, I lose my waypoint and it won't return, not even when I get out again.
Anyone knows why?
[player] join grpNull;
grp = group player;
player joinAs [grp, 1];
grp selectleader player;
call compile format ["wreck_1 setPos [(getPos wreckPos_%1 select 0),(getPos wreckPos_%1 select 1),0]",ceil(random 3)];
createMarker ["crashSiteMarker", position wreck_1];
"crashSiteMarker" setMarkerShape "ICON";
"crashSiteMarker" setMarkerText "Crash site";
"crashSiteMarker" setMarkerType "Dot";
"crashSiteMarker" setMarkerColor "ColorBlue";
sleep(4);
hint "New Crash site location";
_pos1 = getMarkerPos "crashSiteMarker";
sleep(2);
//add waypoint
_crashSiteWaypoint = grp addWaypoint [_pos1, 0];
[grp, 0] setWaypointType "MOVE";
grp setCurrentWaypoint _crashSiteWaypoint;
hint "Waypoint set";
Hope you can help me.