Jump to content
Sign in to follow this  
mattxr

Create Waypoint On Map Click!

Recommended Posts

How can i turn this code into Create waypoint on map click?

_waypoint1 = _group addwaypoint[getmarkerpos"WP2",0];

_waypoint1 setwaypointtype"Move";

Share this post


Link to post
Share on other sites

Name your group TROOPS or whatever then:

troops_moved = true;
hint "Click where to move the troops!";
onMapSingleClick "
_wp1 = TROOPS addwaypoint[_pos,0]; 
[TROOPS, 1] setwaypointtype ""Move"";
_mk1 = createMarkerLocal [""mytroopmoveto"", _pos]; 
""mytroopmoveto"" setMarkerType ""waypoint"";
troops_moved = false;
";
waitUntil{!troops_moved};
onMapSingleClick "";

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
Sign in to follow this  

×