marker 1 Posted April 2, 2014 Ok.. So I create a marker with {if(side _x == civilian) then {_groupCiv set[count _groupCiv,_x];}} foreach (units (group player)); _markerCiv = createMarkerLocal [format["%1_marker",_x],getPos _x]; So this creates a marker with the name civ_1_marker or whatever position the player is in, ie civ_2 civ_3 etc... So. that works all good and I can see my marker on the player when I add marker text etc.. Now the issue arrives when I want to delete the marker. I just cannot remove it, obviously tried the standard ways of deleting them, but they just never seem to remove! Share this post Link to post Share on other sites
IndeedPete 1038 Posted April 2, 2014 If you say "standard ways", did you also try deleteMarker? Share this post Link to post Share on other sites
marker 1 Posted April 2, 2014 Yeah Pete. That is what I meant by standard ways :) Sorry, should have been more descriptive :) Share this post Link to post Share on other sites
Tajin 348 Posted April 2, 2014 d more information in ord ^ That sentence is like the snippet you posted. You can guess what it is about but it's too cut off to know for sure. Anyway, if you create something local, you should also delete it local. Share this post Link to post Share on other sites
Kydoimos 915 Posted April 2, 2014 I think I saw how this was done in the campaign - BIS made it invisible I think, by setting the alpha to 0. Share this post Link to post Share on other sites
IndeedPete 1038 Posted April 2, 2014 That could also work but deleteMarker does its job perfectly. I think the OP probably just applied it wrong, likely just a small mistake in his code. We would be able to help better if he would post the code of waht he's actually trying to get the marker deleted. Share this post Link to post Share on other sites
f2k sel 164 Posted April 2, 2014 (edited) I think the problem is with the marker name, I find if I use format with markers it never works, but as it isn't needed it's easy to get around it. example { _markerCiv = createMarkerLocal [str _x + "_marker",getPos _x]; _markerCiv setMarkerTypeLocal "dot";// change to A3 marker type _markerCiv setMarkerSizeLocal [10,10] ; } foreach units group player ; sleep 4; deletemarkerLocal "civ_1_marker"; Edited April 2, 2014 by F2k Sel Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 2, 2014 from what I read here your marker name does not begin with Civ [color=#333333]_markerCiv = createMarkerLocal [format["%1_marker",_x],getPos _x]; should be [/color][color=#333333]_markerCiv = createMarkerLocal [format["civ_%1_marker",_x],getPos _x]; maybe just a naming issue.[/color] Share this post Link to post Share on other sites
f2k sel 164 Posted April 2, 2014 (edited) That's a fair point KevsnoTrev, but I assumed _x was a unit named civ_1,civ_2 ect as he also used it for position, so it would have to be more than 1,2 ect. You could replace the first _x with another variable and increment it for each unit. _inc = 0; { _inc=_inc+1; _markerCiv = createMarkerLocal [format["civ_%1_marker",_inc],getPos _x]; // rest of marker code } foreach units group player; Edited April 2, 2014 by F2k Sel Share this post Link to post Share on other sites
jacmac 2 Posted April 2, 2014 Is this a problem? _markerCiv = createMarkerLocal "[2412.01,6036.33,-0.839965]_marker"; Share this post Link to post Share on other sites
f2k sel 164 Posted April 2, 2014 Is this a problem? _markerCiv = createMarkerLocal "[2412.01,6036.33,-0.839965]_marker"; it won't work as it's the wrong syntax try this _markerCiv = createMarkerLocal ["_marker",[2412.01,6036.33,-0.839965]]; that would create a marker named "_marker" at these co-ords [2412.01,6036.33,-0.839965] you will need the rest of the marker code as well or nothing will show. Share this post Link to post Share on other sites