{"name":"markerPos","title":"markerPos","type":"command","url":"https://community.bistudio.com/wiki/markerPos","revid":379366,"updated":"2026-10-30T23:56:56Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.46","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.46","arma3_since":"0.50","description":"Returns marker position. See also setMarkerPos.","syntaxes":[{"syntax":"markerPos markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"[x, y, 0], z is always 0","text":"PositionAGL - [x, y, **0**], z is always 0"},"form":"unary","right":{"text":"markerName"}},{"syntax":"markerPos [markerName, preserveElevation]","since":"arma3 1.94","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"preserveElevation","type":"Boolean","optional":true,"default":"false","type_expr":"Boolean","text":"preserveElevation: Boolean - (Optional, default false)"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"if preserveElevation is true or [x, y, 0] if preserveElevation is false","text":"PositionAGL - if *preserveElevation* is true or [x, y, **0**] if *preserveElevation* is false"},"form":"unary","right":{"text":"[markerName, preserveElevation]"}}],"examples":[{"code":["_mPos1 = markerPos \"markerOne\";"]},{"code":["_mPos2 = markerPos [\"markerTwo\", true];"]}],"aliases":["getMarkerPos"],"see_also":["setMarkerPos","setMarkerPosLocal"],"notes":[{"user":"Demellion","date":"2016-09-01T12:42:00Z","text":"To accomplish getting the altitude of a marker before the alternative syntax introduced in A3 v1.93, you can do a workaround using setMarkerDir as it accepts any number (above 360 or below -360):\n\n```sqf\n\"myMarker\" setMarkerPos [200, 200];\n\"myMarker\" setMarkerDir 1640;\n```\n\nAfter, setting player position as an example:\n\n```sqf\nplayer setPosASL [(markerPos \"myMarker\") select 0, (markerPos \"myMarker\") select 1, (markerDir \"myMarker\")]\n```"}]}