xjacksssss

Adding map markers

11 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.

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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

Spoiler

//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)

Spoiler

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

Spoiler

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

then in addons\markersnstuff\init.sqf

Spoiler

#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".

Spoiler

_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, https://github.com/Warsheep-GER/ws_objects

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
  • Like 1

Share this post


Link to post
Share on other sites

I know this is an old thread, but my question directly relates...

We like to do adhoc events on our server.
I would like to be able to place an icon with text on the map and delete it when the event is done.
I haven't tried yet, but I believe there is code above to place and icon. If that would work I would just need to know how to delete it manually.

Can someone help me with the F3 debug screen code to do this please?

Share this post


Link to post
Share on other sites
On 6/27/2017 at 0:04 PM, lords8n said:

I know this is an old thread, but my question directly relates...

We like to do adhoc events on our server.
I would like to be able to place an icon with text on the map and delete it when the event is done.
I haven't tried yet, but I believe there is code above to place and icon. If that would work I would just need to know how to delete it manually.

Can someone help me with the F3 debug screen code to do this please?

https://community.bistudio.com/wiki/deleteMarker

Share this post


Link to post
Share on other sites

hey guys, I know this is an old topic but mine relates to it. We have created a new trader to our cherno 2035 server and need to implement a new marker for it, but we cant get it to work. When the server starts up it just endlessly loops. Attached is the Mission.sqm file and I would greatly appreciate any help to make it work. I have tried everything from rearranging them.

https://pastebin.com/wsfufQj8

I want to say its got to do with the alt offset for the map, because that's like the last thing we tried. Any help would be great.

 

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.