Jump to content
Sign in to follow this  
1para{god-father}

Help with Markers

Recommended Posts

I am trying to place markers over certain location , but am having a little issue!

Anyone know how I can do this ? I need a Marker over Each Location that is in the _towns array

mymissionmarkers = [];
_gamelogic = center;
_towns = nearestLocations [getPosALT _gamelogic, ["hill","NameLocal"], 25000]; 
sleep .2;

{
_pos = position _towns ;
_mkr = str _pos;
if (getMarkerPos _mkr select 0 == 0) then {
	_mkr = createMarkerLocal[_mkr, _pos]; 
	_mkr setMarkerShapeLocal "RECTANGLE"; 
	_mkr setMarkerTypeLocal "SOLID";		
	_mkr setMarkerSizeLocal [50,50]; 
	_mkr setMarkerAlphaLocal 0.5; 
	_mkr setMarkerColor "ColorBlack";
};
mymissionmarkers set [count mymissionmarkers,_mkr];
} forEach _towns;

diag_log format[mymissionmarkers, time];

Edited by 1PARA{God-Father}

Share this post


Link to post
Share on other sites

you have a mistake in your getPosATL (ALT), you need to get the location position from the current index _x not from _towns.

Other than that seems ok.

Share this post


Link to post
Share on other sites
you have a mistake in your getPosATL (ALT), you need to get the location position from the current index _x not from _towns.

Other than that seems ok.

you mean _pos = position _towns ; right? That should be _pos = position _x;

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  

×