Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Luft08

Marker is created at [0,0,0]

Recommended Posts

When I run the following code the marker is created at [0,0,0] instead of the position specified:

private _marker = createMarker["southForestMarker", [8926.676,5542.027, 0]];
southForestMarker setMarkerShape "RECTANGLE";
southForestMarker setMarkerAlpha 0;
southForestMarker setMarkerSize [6000,6000];
southForestMarker setMarkerDir 0;

I can move the marker with:

southForestMarker setMarkerPos [8926.676,5542.027, 0];

But I don't understand why I need to do that.

Share this post


Link to post
Share on other sites
_marker = createMarker ["southForestMarker", [8926.676,5542.027]];  //z coord is unnecessary unless you need to pass it to another command
_marker setMarkerShape "RECTANGLE";
_marker setMarkerSize [6000,6000];
_marker setMarkerAlpha 0;
_marker setMarkerDir 0;

No reason not to stick with the handle when creating the marker. Regardless, you need to put marker names in quotes, always. This does nothing:

southForestMarker setMarkerShape "RECTANGLE";
southForestMarker setMarkerAlpha 0;
southForestMarker setMarkerSize [6000,6000];
southForestMarker setMarkerDir 0;

Your original code corrected:

private _marker = createMarker ["southForestMarker", [8926.676,5542.027, 0]];
"southForestMarker" setMarkerShape "RECTANGLE";
"southForestMarker" setMarkerAlpha 0;
"southForestMarker" setMarkerSize [6000,6000];
"southForestMarker" setMarkerDir 0;
  • Like 1

Share this post


Link to post
Share on other sites

southForestMarker is variable which is undefined
"southForestMarker" is the reference to the marker you created

Share this post


Link to post
Share on other sites
Sign in to follow this  

×