{"name":"getWPPos","title":"getWPPos","type":"command","url":"https://community.bistudio.com/wiki/getWPPos","revid":377567,"updated":"2026-01-02T06:55:33Z","groups":["Waypoints"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the position of a selected waypoint of a given group. Waypoints include only those which were placed in the mission editor.","syntaxes":[{"syntax":"getWPPos [groupOrUnit, index]","params":[{"name":"groupOrUnit","type":"Group or Object","description":"the group (or unit) of which to select a waypoint","type_expr":"Group | Object"},{"name":"index","type":"Number","description":"0 equals the starting position of the group.\nThe number used in this and other waypoint commands is *one more* than the one displayed in the waypoint window in the editor: e.g if the editor labeled a waypoint `\"0:MOVE\"` then it can be accessed using `getWPPos [grp, 1]`","type_expr":"Number"}],"returns":{"type":"Position3D","type_expr":"Position3D","description":"the returned position equals [0,0,0] if the selected waypoint does not exist."},"form":"unary","right":{"text":"[groupOrUnit, index]"}}],"examples":[{"code":["[_group1, 1] setWPPos [200,600,0];\n_pos = getWPPos [_group1, 1]; // returns [200, 600, 0]"]}],"aliases":["waypointPosition"],"see_also":["setWPPos"]}