{"name":"currentWaypoint","operator":null,"title":"currentWaypoint","type":"command","url":"https://community.bistudio.com/wiki/currentWaypoint","revid":378132,"updated":"2026-02-22T20:40:12Z","groups":["Waypoints"],"status":"ok","replaced_by":[],"games":[{"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":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the *index* of the current waypoint (**not** the waypoint in Waypoint Array format).\n\n- To determine the validity of the index, compare it to the waypoints count.\n- If all waypoints are completed, then the index is 1 greater than the last valid index.\n- If there are no waypoints, then the index is 0.\n\nBy default, a group has one already-completed waypoint at their starting position, making the first waypoint number one, not zero.","syntaxes":[{"syntax":"currentWaypoint groupName","since":null,"effect":null,"exec":null,"params":[{"name":"groupName","type":"Group","optional":false,"default":null,"description":null,"types":["Group"],"since":null,"text":"groupName: Group"}],"returns":{"type":"Number","types":["Number"],"description":"index of the current waypoint","text":"Number - index of the current waypoint"},"form":"unary","operator":null,"left":null,"right":{"text":"groupName","types":["Group"]}}],"examples":[{"text":"```sqf\n_index = currentWaypoint group player;\n```","code":["_index = currentWaypoint group player;"]},{"text":"```sqf\n_waypointFormat = [_group, currentWaypoint _group];\n```","code":["_waypointFormat = [_group, currentWaypoint _group];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["waypoints","setCurrentWaypoint"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Waypoints","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}