Sign in to follow this  
Followers 0

Adding map markers

3 posts in this topic

hi all,

just wondering how i would go about adding markers on the map permanently, for example i want to add a custom trader and add a marker for it, thanks in advance 

Share this post

Link to post
Share on other sites

To add map markers you need to add them to your mission.sqm file.

Search the file for "class Markers". Below this there will be a number, eg "items=17;". This MUST match the amount of markers you have including the first one number 0. EG 5 markers would run from 0-4.

You should be able to see the way the code works from looking at your mission.sqm. What i do is add a marker in the editor to get the cords i want then just add it to the file.

1 person likes this

Share this post

Link to post
Share on other sites

Posted (edited)

Or you can put something like this in a separate file(in your mission.pbo, lets call it markers.sqf


//Top left corner marker for altis
_pos = [1000,30000,0];
_object = createMarker ["Info_1", _pos];
_object setMarkerShape "ICON";
_object setMarkerText "This text and marker should be top left";
_object setMarkerColor "ColorBlack";	
_object setMarkerType "mil_unknown";

_pos = [1000,29750,0];
_object = createMarker ["Info_2", _pos];
_object setMarkerShape "ICON";
_object setMarkerText "This marker should be just below the first one";
_object setMarkerColor "ColorBlack";	
_object setMarkerType "mil_unknown";

//And you can just go on and add more and more, keep in mind that your coordinates is not the same in .sqf as in the mission.sqm, you'll figure it out

Then in init.sqf (just create in the mission root it if you don't got it)


if (hasInterface || isServer) then
	if (isServer) then {call compile preprocessFile "markers.sqf";};

If you want to have separate files for separate things you can do this in init.sqf


if (hasInterface || isServer) then { if (isServer) then {call compile preprocessFile "addons\markersnstuff\init.sqf";}; };

then in addons\markersnstuff\init.sqf


#include "markers.sqf"
#include "markers_2.sqf"
#include "markers_3.sqf"
#include "markers_4.sqf"

//systemChat "Markers and suff added";
diag_log "Markers and stuff added";

You get the idea. You could of add buildings and objects this way too, like a big ass pier (this one is over water on the altis map, thus the "setPosASL".


_pos = [28911.03125,27364.353516,-2.08839];
_object = createVehicle ["Land_Pier_addon", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 0;
_object setPosASL _pos;
//[_object, 0, 0] call BIS_fnc_setPitchBank;
_object enableSimulation false;

However, i prefer using warsheeps method and putting all extra markers, buildings and stuff in a serverside .pbo,

If you use the posted variant keep in mind that the marker name must be unique, ie. info_1, info2 etc. well, guess thye have to be unique any way =)  after that its just to figure out the coordinates.  

I hate bloating the original files with stuff and if theres updates(to the mission.sqm) i need to do it all over again, how much that is learning by repeating,i still hate it =)

Edited by Cael817
Cant spell

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.