Jump to content
ShadowRanger24

Creating Markers Not Working

Recommended Posts

So I'm trying to create markers but for some reason using the createMarker commands aren't working. Here's the test code I'm working with trying to get it working:

 

createMarkerLocal ["Test", [0,0,0]]; 
"Test" setMarkerShapeLocal "RECTANGLE"; 
"Test" setMarkerColorLocal "ColorBlue"; 
"Test" setMarkerTextLocal "Test";

 

Using this code has no effect what so ever. The marker does not show up for some reason. Any ideas why?

Share this post


Link to post
Share on other sites

You're creating a rectangle of zero height and zero width in the corner of the visible map. It's not surprising you can't find it.

Share this post


Link to post
Share on other sites

You're creating a rectangle of zero height and zero width in the corner of the visible map. It's not surprising you can't find it.

incorrect, the marker is created with size [1,1]

MrCopyright is right, the marker is created at the bottom of the map

Share this post


Link to post
Share on other sites

Hi guys could someone explain how i get a marker to appear with a random mission, i am using, I have tried sooooo many  different versions and nothing is work, i would like to have a few simple missions on my server (mp) hosted by streamline.....I can get my static missions working but my random ones no luck at all 

 


_marker = createMarker ["testtest", _pos = [[14672,16625.6], 0, 13000, 3, 0, 1.0, 0] call BIS_fnc_findSafePos;

_newtanks29 = [_pos, EAST, (configFile >> "CfgGroups" >> "EAST" >> "OPF_F" >> "Armored" >> "OIA_TankPlatoon")] call BIS_fnc_spawnGroup;

    _markerstr = createMarker ["TestTest",_newtanks29]; 
    _markerstr setMarkerType "ExileMissionModerateIcon";
    _markerstr setMarkerText "Test Test Charlie";

Share this post


Link to post
Share on other sites

The syntaxes are messy but it was close. Here is the correct version with comments on what was wrong. Compare it with your script.

_marker = createMarker ["testtest", [[14672,16625.6], 0, 13000, 3, 0, 1.0, 0] call BIS_fnc_findSafePos]; //Don't use a local var and pay attention to closing all brackets
// If you want to create more than one marker then you'll have to assign different names to them ("testtest") otherwise they won't be created
_newtanks29 = [_pos, EAST, (configFile >> "CfgGroups" >> "EAST" >> "OPF_F" >> "Armored" >> "OIA_TankPlatoon")] call BIS_fnc_spawnGroup; // This function returns a group
    _markerstr = createMarker ["TestTest",leader _newtanks29]; // position: Array or Object - format position: Position3D, Position2D or Object
    // As already said but this marker might not be created with the same name
    _markerstr setMarkerType "ExileMissionModerateIcon"; // This is not a standard A3 marker but if it is defined then okay
    _markerstr setMarkerText "Test Test Charlie";

 

Share this post


Link to post
Share on other sites

7erra thank you for the quick reply i really appreciate it!!! I only want one marker to appear "ExileMissionModerateIcon" its the Exile mission icons that everyone seems to use nowadays, (red ring black center) am I getting confused between what is a marker and what is an Icon? 

I am obviously REALLY NEW to doing this 

Share this post


Link to post
Share on other sites

hI 7ERRA  tried your script nothing happened no errors in the rpt file 

 

Share this post


Link to post
Share on other sites

Oh yeah I forgot one thing: Put this one line above setMarkerType:

_markerstr setMarkerShape "ICON";

 

Share this post


Link to post
Share on other sites

7erra that did not work either, nothing seems to be working...very disheartening been working on this for over a week, all i want is to have my own missions to spawn in a random position in altis with a nice icon, nothing against DMS but everyone uses it i just do not want to i would like my own custom missions nothing to fancy 

Share this post


Link to post
Share on other sites

Okay that was one hell of an obvious error: 

Change this line...

_marker = createMarker ["testtest", [[14672,16625.6], 0, 13000, 3, 0, 1.0, 0] call BIS_fnc_findSafePos];

to this...

_markerStr = createMarker ["testtest", [[14672,16625.6], 0, 13000, 3, 0, 1.0, 0] call BIS_fnc_findSafePos];

Notice the variable name? We used two different ones. Makes me wonder why there is no error about an undefined variable though. How are you executing the script? Another thing to keep in mind is that BIS_fnc_findSafePos returns pretty far away positions. Maybe [] call BIS_fnc_randomPos is better suited.

 

23 hours ago, macnova1 said:

nothing against DMS but everyone uses it

What is DMS?

Share this post


Link to post
Share on other sites

 Hi 7erra that did not work either, im just calling it through infistar console for now to see if it works, DMS is a mod that has missions all the script is already written 

Share this post


Link to post
Share on other sites

Ah the _pos variable wan't defined :

_pos = [[14672,16625.6], 0, 13000, 3, 0, 1.0, 0] call BIS_fnc_findSafePos;
_newtanks29 = [_pos, EAST, (configFile >> "CfgGroups" >> "EAST" >> "OPF_F" >> "Armored" >> "OIA_TankPlatoon")] call BIS_fnc_spawnGroup;
_markerstr = createMarker ["TestTest",leader _newtanks29];
_markerstr setMarkerShape "ICON";
_markerstr setMarkerType "ExileMissionModerateIcon";
_markerstr setMarkerText "Test Test Charlie";

 

Share this post


Link to post
Share on other sites

You can use several times the same local variable. No reason to change it. But... you can't have the same string name "testtest" for 2 different markers.

 

for "_i" from 0 to 9 do {
  _trg = createMarker ["test"+str(_i), player getpos [10 + random 20,random 360]];
  _trg setMarkerType "mil_dot";
  _trg setMarkerText "Test";
};

will work because I changed "testtest" by "test"+str(_i). If not, you'll obtain only the first marker.

So verify if "testtest" already exists (not markertext but marker name) and verify if your "ExileMissionModerateIcon" is a workable icon marker. I don't have exile.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×