twisted 127 Posted August 11, 2012 hi. I am trying to make a script automatically sets up a marker where a certain group logic is placed. but i read that each marker needs a unique name. i found something very useful for making unique names. http://forums.bistudio.com/showthread.php?138485-Is-it-possible-to-have-dynamically-named-variables so i reckon if i can count all markers on map, then name the newest marker something like marker+(totalmarkers+1) each would be guaranteed uniue. my question is....... How do i count all the markers on the map? Share this post Link to post Share on other sites
riouken 15 Posted August 11, 2012 There is no command to count all markers. But you can just use a variable instead: in the init.sqf set this: total_markers = 0; now in our marker creation script: Marker_index = total_markers; _marker_name = format["Marker_%1",Marker_index]; _marker = createMarker [_marker_name, _markerpos]; /// Set all your other marker properties here... total_markers = total_markers + 1; Now each time you run it it will update the marker_index and provide each marker a new name. Share this post Link to post Share on other sites
twisted 127 Posted August 11, 2012 awesome. works perfectly! thank you very much. Share this post Link to post Share on other sites