fusion13 11 Posted December 10, 2013 How could I make it so that onMapSingleClick can be used multiple time in one file to make three different markers? I have so far onMapSingleClick {createMarker ["bomber", _pos];}; I wanna make a onMapSingleClick for createMarker "bomber2" and "bomber3" this possible? :bounce3: Share this post Link to post Share on other sites
f2k sel 164 Posted December 10, 2013 add this line onMapSingleClick {createMarker ["bomber", _pos];}; "bomber" setMarkerType "Arrow"; Share this post Link to post Share on other sites
fusion13 11 Posted December 10, 2013 But how dose that allow me to make several markers in one .sqf? using the OnMapSingleClick Share this post Link to post Share on other sites
albertfish 11 Posted December 11, 2013 In Arma 3 you should use BIS_fnc_addStackedEventHandler instead of onMapSingleClick. This will allow you to add multiple event handlers for the onMapSingleClick event. Share this post Link to post Share on other sites
meatball 25 Posted December 29, 2013 With onMapSingleClick, does anyone know if there's a way to 'escape' out of the command and drop out of it with another key stroke other than a mouse click? Share this post Link to post Share on other sites
dragonsyr 21 Posted December 29, 2013 (edited) @ Meatball try while {![b]VisableMap[/b]} do { [b]showMap[/b] True; onMapSingleClick your block ofcode... ; waitUntil {{[b]VisableMap[/b]}};}; or opposite ! on waituntil side... not tested for sure. with this i think that if you close the map , then the script ends/continue next line of code.... Edited December 29, 2013 by dragonsyr Share this post Link to post Share on other sites
meatball 25 Posted December 29, 2013 Ah, perfect, thanks! I had a waituntil already in there waiting for the singleClick so I just added in 'or !(visibleMap)' and then added an if statement right after that doing an exitwith if !visiblemap and cancelling the onMapSingleClick. Share this post Link to post Share on other sites
drunken officer 18 Posted December 30, 2013 @Dragonsyr Use your script and do a test. Open the map by your script. Close the map (Yes, your script is canceled at this moment). Open the map again (but not by your script !!! ) and do a single click. See what happend... Why? The waitUntil-command is behind you onClick command. And this is still in your memory. To avoid this, i set a variable to nil. openMap [true, false]; titleText ["Senden sie die Koordinaten (Einfack-Klick auf Karte)","PLAIN",1]; onMapSingleClick "[color="#0000FF"]ari_ziel = _pos;[/color][color="#00FF00"] anforderung = true;[/color] onMapSingleClick ''; true;"; waitUntil {!visibleMap || [color="#00FF00"]anforderung[/color]}; if (!anforderung) exitWith {titleText ["","PLAIN",0.5]; [color="#0000FF"]ari_ziel = nil;[/color] hint "Unterstützungsanforderung abgebrochen";}; You can work around only with !visibleMap, sure, but you need one step, to set the clickpos to nil. Share this post Link to post Share on other sites
dragonsyr 21 Posted December 30, 2013 this is not for me Drunken Officer, i never tested that i send, btw , problem is solved for meatball (see above) thanks anyway... Share this post Link to post Share on other sites