ramon_dexter 14 Posted April 6, 2015 How do I make a script to place a map marker into a map? Triggered by a trigger, or anything else. I want the script to mark new locations for a player via conversation option. The conversation is done, but I really don't know how to simply place a marker. I tried building this: "markPlace" setMarkerShape "ICON"; "markPlace" setMarkerShape "hd_objective"; "markPlace" setMarkerColor "ColorRed"; "markPlace" setMarkerText "Place"; this = createMarker ["markPlace", getPos marker]; /// marker - in editor placed invisible marker But it won't do a thing. I already looked into the community wiki and build this code, which don't work. Share this post Link to post Share on other sites
[evo] dan 79 Posted April 6, 2015 have you tried using "marker" in your getPos instead of marker? Share this post Link to post Share on other sites
jshock 512 Posted April 6, 2015 You have to create the marker before applying changes to it. Share this post Link to post Share on other sites
ramon_dexter 14 Posted April 6, 2015 If I put first create marker, nothing happens. this = createMarker ["markPlace", mIfestiona]; "markPlace" setMarkerShape "ICON"; "markPlace" setMarkerShape "hd_objective"; "markPlace" setMarkerColor "ColorRed"; "markPlace" setMarkerText "Place"; When I try to modify already existing marker (here mIfestiona), nothing happens. "mIfestiona" setMarkerShape "ICON"; "mIfestiona" setMarkerShape "hd_objective"; "mIfestiona" setMarkerColor "ColorRed"; "mIfestiona" setMarkerText "Hefaistiona"; Any suggestions? Share this post Link to post Share on other sites
seed 11 Posted April 6, 2015 You can try this. Place down on your map a "game logic-town", where you want the objective to be, and name it "Town1". Then make a createmarker.sqf [color="#FF8040"][color="#1874CD"]_townpos[/color] [color="#8B3E2F"][b]=[/b][/color] Town1[color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// add marker on AO/target[/i][/color] [color="#1874CD"]_marker[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createMarker[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"mIfestiona"[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_townpos[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerType[/b][/color] [color="#7A7A7A"]"hd_objective"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerColor[/b][/color] [color="#7A7A7A"]"ColorRed"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerText[/b][/color] [color="#7A7A7A"]" Hefaistiona"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerSize[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter With that you will create a marker on that position. Hope that helps. Regards Seed Share this post Link to post Share on other sites
jshock 512 Posted April 6, 2015 You can try this. Place down on your map a "game logic-town", where you want the objective to be, and name it "Town1". Then make a createmarker.sqf [color="#FF8040"][color="#1874CD"]_townpos[/color] [color="#8B3E2F"][b]=[/b][/color] Town1[color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// add marker on AO/target[/i][/color] [color="#1874CD"]_marker[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createMarker[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"mIfestiona"[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_townpos[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerType[/b][/color] [color="#7A7A7A"]"hd_objective"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerColor[/b][/color] [color="#7A7A7A"]"ColorRed"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerText[/b][/color] [color="#7A7A7A"]" Hefaistiona"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_marker[/color] [color="#191970"][b]setMarkerSize[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter With that you will create a marker on that position. Hope that helps. Regards Seed You still need to getPos the logic: _townpos = getPos Town1; // add marker on AO/target _marker = createMarker ["mIfestiona", _townpos]; _marker setMarkerType "hd_objective"; _marker setMarkerColor "ColorRed"; _marker setMarkerText " Hefaistiona"; _marker setMarkerSize [1,1]; Share this post Link to post Share on other sites
seed 11 Posted April 6, 2015 Yes thank you JShock. I forgot that. While we are at it. Can you explain in short what is the difference between "getPos" and "getPosATL" scriptwise ? Regards Seed Share this post Link to post Share on other sites
jshock 512 Posted April 6, 2015 Can you explain in short what is the difference between "getPos" and "getPosATL" scriptwise ? From the wiki's: getPos: Returns the object position in format Position. Z value is height over the surface underneath. getPosATL: Returns the position of an object relative to the terrain. getPosATL is also "newer" in the sense that it was introduced in Arma 2. Share this post Link to post Share on other sites
L3TUC3 32 Posted April 6, 2015 You can use getMarkerPos if you need to grab a marker's coordinates. Markers are different from objects like logics so using getPos (like your first example) won't work on them. https://community.bistudio.com/wiki/getMarkerPos Share this post Link to post Share on other sites
mcongrove 0 Posted September 15, 2015 Hate to wake up a thread from April, but the forum rules won't let me open a new thread and this one is related. I've created a marker using the createMarker (just a dot at the user's location). However, I then can't remove the marker via the map (open map, hover over dot, press Delete key). Essentially I'm trying to recreate, through scripting, the action of someone opening the map and placing a dot marker for everyone on their side to see... and the marker is able to be deleted later. Anyone have an idea? Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted September 15, 2015 Maybe add an event handler https://community.bistudio.com/wiki/onMapSingleClick Share this post Link to post Share on other sites