Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: nl
Location:
Occupation:
Age:
In-game name: Daefera

 
#1 Posted at 2013-06-25 09:32        
     
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.


Author Message


Posts: 1471
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2013-06-25 16:00        
     
You can't see waypoints in vehicles, you can get them back again after you get out by looping the waypoint creation and deleting it every few seconds or even simpler you can look on the map and then left shift and left mouse you will create a temp waypoint (green).


A better solution and one that works in vehicles is to create a simple task.


replace your waypoint stuf with this.

task1 = player createSimpleTask ["Rescue"];
task1 setSimpleTaskDestination ( _pos1);
task1 setSimpleTaskDescription ["Move to Wreck and Rescue","Rescue","Wreck Location"];
task1 setTaskState "CREATED";

You will need to select the task from the map but after that it will be visible in and out of vehicles.


Advertisement


Author Message


Posts: 2
Rank:


Level: Member

Country: nl
Location:
Occupation:
Age:
In-game name: Daefera

 
#3 Posted at 2013-06-25 16:40        
     
Thanks. Will try!