Luft08 27 Posted March 9, 2020 The wiki gives an example of the use of createMarker: _marker1 = createMarker ["Marker1", position player]; It also explains the parameters as: name, position and says that it returns a string. However, I don't understand what the string is. How can I use it? Is it some kind of id? Share this post Link to post Share on other sites
Larrow 2823 Posted March 9, 2020 26 minutes ago, Luft08 said: However, I don't understand what the string is. It will be "Marker1" the name given to the marker, as all markers are referenced via their name. For instance getMarkerPos Quote Syntax: getMarkerPos markerName Parameters: markerName: String Share this post Link to post Share on other sites
Luft08 27 Posted March 9, 2020 So it returns one of the parameters that I supply? I don't understand how that is helpful? Share this post Link to post Share on other sites
Harzach 2518 Posted March 9, 2020 You can then use that string to further manipulate the associated marker, for instance to move it, change its appearance, or delete it. 1 Share this post Link to post Share on other sites
Luft08 27 Posted March 9, 2020 Yes, but my point is that it is a string that I supplied so I could do that even if it didn't return anything. I already have the string. Maybe I'm not understanding something? Oh well, it is what it is... Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted March 9, 2020 4 minutes ago, Luft08 said: Yes, but my point is that it is a string that I supplied so I could do that even if it didn't return anything. I already have the string. Maybe I'm not understanding something? Oh well, it is what it is... You can use the returned string to check if the marker has been created successfully. Marker creation can fail if the marker name is already used by a marker, the createMarker command returns an empty string in that case. Cheers 1 Share this post Link to post Share on other sites
Luft08 27 Posted March 9, 2020 Now that makes sense. Thanks. Share this post Link to post Share on other sites