Jump to content
ovialop

Waypoint & Markers set during the mission

Recommended Posts

Hello there :),

how can i include a waypoint or a "side-marker" which i set during the mission in a script please? I'd like to send my group to a waypoint i choose after mission start and send another group to the same point over a script/trigger. I tried to "find" the waypoint with "waypoints group" but only waypoints set in the editor are shown like this i guess. How can i do this? 

Sorry for bad english and thank you very much :) 

  • Like 1

Share this post


Link to post
Share on other sites

Welcome on Bi forum.

You can script what you want and add waypoint for the group you want. Just have a look at addWaypoint command, and all associated commands (see also links).

If you need to choose a location/position passed to the waypoint, you can work with the onMapSingleClick event handler.

 

Quick example:

player addAction ["go to destination", {
    params ["","_pos","",""];
    openmap [true,false];
  ["click", "onMapSingleClick", {
  titleText["Select Map Position", "PLAIN"];
   _wp = myGroup addWaypoint [_pos,0];
   _wp setWaypointType "SAD";
   deleteMarker "customObjective";
   _mk = createMarker ["customObjective",_pos];
   _mk setMarkerText "Go here";
   _mk setMarkertype "hd_objective";
   openmap [false,false];
  onMapSingleClick "";
  false
  }] call BIS_fnc_addStackedEventHandler;
 }];

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

This works great and it is a good simple example to customize (for noobs like me :D) Thank you very much pierremgi! 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×