Jump to content
Sign in to follow this  
twisted

read marker position in script

Recommended Posts

Hi. i am writing a script for a mp mission and i want to read marker positions from the mission editor and then store them in an array.

how do i do this?

And do i have to pass the markers to the script via init line (clunky if many markers) or can the script proactively access the markers on the map in another way?

Share this post


Link to post
Share on other sites

I think there's no way to check out the markers on map unless you track them while being created or you know it's name. If all of them are placed in the editor, then make a list of them and get its position with markerPos. Kinda of:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_markers = ["marker1", "marker2", "marker3"];

_positions = [];

{

_positions = _positions + [markerPos _x];

} forEach _markers;

hope it helps

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  

×