Jump to content
Blitzen88

Any Way to Hide All Markers that Start with or Contain a Certain Text?

Recommended Posts

Basically title but....

 

Is there any way to automatically setmarkeralpha 0 for all markers that start with certain letters?  For instance, setmarkeralpha 0 for all markers that start with "Obj_" ?

 

Thanks!

Edited by Blitzen88
Grammer

Share this post


Link to post
Share on other sites
_searchString = "Obj_";

{
	_x params[ "_markerName" ];
	
	if ( _markerName find _searchString isEqualTo 0 ) then {
		_markerName setMarkerAlpha 0;
	};
}forEach allMapMarkers;

Keep in mind find is case sensitive, so you might want to use toLower or toUpper on both the strings.

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, Larrow said:

_searchString = "Obj_";

{
	_x params[ "_markerName" ];
	
	if ( _markerName find _searchString isEqualTo 0 ) then {
		_markerName setMarkerAlpha 0;
	};
}forEach allMapMarkers;

Keep in mind find is case sensitive, so you might want to use toLower or toUpper on both the strings.

This seems to work really well.

 

Thank you!

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

×