{"name":"getWPPos","operator":null,"title":"getWPPos","type":"command","url":"https://community.bistudio.com/wiki/getWPPos","revid":377567,"updated":"2026-01-02T06:55:33Z","groups":["Waypoints"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.21"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.21"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"groupOrUnit","type":"Group or Object","optional":false,"default":null,"description":"the group (or unit) of which to select a waypoint","types":["Group","Object"],"since":null,"text":"groupOrUnit: Group or Object - the group (or unit) of which to select a waypoint"},{"name":"index","type":"Number","optional":false,"default":null,"description":"0 equals the starting position of the group.\n\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]`","types":["Number"],"since":null,"text":"index: Number - 0 equals the starting position of the group.\n\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]`"}],"returns":{"type":"Position3D","types":["Position3D"],"description":"the returned position equals [0,0,0] if the selected waypoint does not exist.","text":"Position3D - the returned position equals [0,0,0] if the selected waypoint does not exist."},"form":"unary","operator":null,"left":null,"right":{"text":"[groupOrUnit, index]","types":["Array"]}}],"examples":[{"text":"```sqf\n[_group1, 1] setWPPos [200,600,0];\n_pos = getWPPos [_group1, 1]; // returns [200, 600, 0]\n```","code":["[_group1, 1] setWPPos [200,600,0];\n_pos = getWPPos [_group1, 1]; // returns [200, 600, 0]"]}],"multiplayer":null,"problems":null,"aliases":["waypointPosition"],"see_also":["setWPPos"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Waypoints","Introduced with Operation Flashpoint version 1.21","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}