Jump to content
Sign in to follow this  
jagga99

[Please help] How to put an array of markers of coordinates X,Y (without Z)

Recommended Posts

Dear friends,

 

I have an array of coordinates (X,Y) without Z coordinate. Approximatly 20+ dots.

Please help me find a way to put this markers on the map in Editor mode (I should be able to see in game these dots).

 

Markers are in the following format:

 

Marker1, {X,Y}

Marker2, {X,Y}

etc.

 

Thank a lot for your assistance!

 

 

Share this post


Link to post
Share on other sites

Try posting in the Mission Editing/Scripting forum rather than here, its a much more suitable place and you're more likely to get a scripting-guru to respond. Also, help yourself by not bumping your own post (and by posting in the correct place to begin with).

Share this post


Link to post
Share on other sites

Try posting in the Mission Editing/Scripting forum rather than here, its a much more suitable place and you're more likely to get a scripting-guru to respond. Also, help yourself by not bumping your own post (and by posting in the correct place to begin with).

Like he said, this place is used only for general questions e.g. "How to access the showcase menu".

Share this post


Link to post
Share on other sites

I dont particularly understand what youre asking, but I assume youre trying to create a bunch of markers in a script

 

Please look at the Marker Scripting Commands Group

 

A quick google search would have revealed this for you. Take a look at the available commands with the examples first before posting.

 

 

Anyway, here is the code that you will need:

_markerPositions = [[x1,y1],[x2,y2],...,[xn,yn]]; // A nested array of 2D positions
{
   _position = _markerPositions select _forEachIndex; // Selects the marker position from the list
   _markerName = format ["ArrayMarker_%1",_forEachIndex]; // Creates a name variable
   _marker = createMarker [_markerName,_position]; // Creates a global marker with name from variable above
   // Sets the marker properties
   _marker setMarkerType "hd_dot";
   _marker setMarkerColor "ColorBlack";
   _marker setMarkerDir 0;
   _marker setMarkerSize [1,1];
} forEach _markerPositions;

Bull

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  

×