{"name":"addWaypoint","operator":null,"title":"addWaypoint","type":"command","url":"https://community.bistudio.com/wiki/addWaypoint","revid":377574,"updated":"2026-01-02T06:56:28Z","groups":["Waypoints"],"status":"ok","replaced_by":[],"games":[{"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":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"global","server_exec":false},"exec":null,"description":"Adds (or inserts when index is given) a new waypoint to a group.\n\nThe waypoint is placed randomly within a circle with the given center and radius.\n\n> [!NOTE]\n> For older titles and prior to Arma 3 v1.90, use setWaypointPosition if you need exact waypoint placement.","syntaxes":[{"syntax":"groupName addWaypoint [center, radius, index, name]","since":null,"effect":null,"exec":null,"params":[{"name":"groupName","type":"Group","optional":false,"default":null,"description":null,"types":["Group"],"since":null,"text":"groupName: Group"},{"name":"center","type":null,"optional":false,"default":null,"description":"PositionAGL (PositionASL if *radius* is negative!) or Object","types":["PositionAGL","PositionASL","Object"],"since":null,"text":"center: PositionAGL (PositionASL if *radius* is negative!) or Object"},{"name":"radius","type":"Number","optional":false,"default":null,"description":"random waypoint placement within *radius* from *center*; Arma 3 v1.90 -1 can be used for exact waypoint placement","types":["Number"],"since":null,"text":"radius: Number - random waypoint placement within *radius* from *center*; Arma 3 v1.90 -1 can be used for exact waypoint placement"},{"name":"index","type":"Number","optional":true,"default":"-1","description":"can be used to insert a waypoint in between existing waypoints; if it is invalid, the waypoint will be added at the end","types":["Number"],"since":null,"text":"index: Number - (Optional, default -1) can be used to insert a waypoint in between existing waypoints; if it is invalid, the waypoint will be added at the end"},{"name":"name","type":"String","optional":true,"default":"\"\"","description":"waypointName","types":["String"],"since":null,"text":"name: String - (Optional, default \"\") waypointName"}],"returns":{"type":"Waypoint","types":["Waypoint"],"description":null,"text":"Waypoint"},"form":"binary","operator":null,"left":{"text":"groupName","types":["Group"]},"right":{"text":"[center, radius, index, name]","types":["Array"]}}],"examples":[{"text":"```sqf\n_wp = _grp addWaypoint [position player, 0];\n```","code":["_wp = _grp addWaypoint [position player, 0];"]},{"text":"```sqf\n_wp = _grp addWaypoint [position player, 0];            // imprecise, placed like [[setVehiclePosition]]'s \"NONE\" placement\n_wp setWaypointPosition [getPosASL player, -1];            // from Operation Flashpoint: Elite to Arma 3 v1.88\n\nprivate _wp = _grp addWaypoint [getPosASL player, -1];    // Arma 3 v1.90+: precise placement\n```","code":["_wp = _grp addWaypoint [position player, 0];\t\t\t// imprecise, placed like [[setVehiclePosition]]'s \"NONE\" placement\n_wp setWaypointPosition [getPosASL player, -1];\t\t\t// from Operation Flashpoint: Elite to Arma 3 v1.88\n\nprivate _wp = _grp addWaypoint [getPosASL player, -1];\t// Arma 3 v1.90+: precise placement"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["waypoints","createGuardedPoint","deleteWaypoint","copyWaypoints","move","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointHousePosition","setWaypointPosition","currentWaypoint","waypointName","waypointSpeed","setWPPos"],"notes":[{"user":"Tijmenjoppe","date":"2009-11-26T18:07:00Z","text":"In game versions prior to Arma 3 v1.22:\nIf you add a waypoint to your group and then want them to start moving to that waypoint, make sure to call setWaypointType \"MOVE\" on your waypoint."},{"user":"Giova","date":"2014-06-21T22:38:00Z","text":"if you want to create a waypoint of type \"MOVE\" and set it as actual waypoint, you can use the move command that does everything for you with only one line of code !\n\nBe aware that move command intercepts multiple waypoints and it will not line up in waypoints queue.\nIn other word it is a quick solution if you want your group to get only one waypoint, but for several waypoints you'll have to use addwaypoint and all setwaypointXXXXXX commands around.\nsee move command."},{"user":"OdinViking","date":"2014-08-05T01:49:00Z","text":"The waypoint may not be created exactly at the center position even if radius is zero. The position will be moved away if there are e.g. rocks at the center position or if it is placed at the edge of water on a shore."}],"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: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}