{"name":"setWaypointScript","operator":null,"title":"setWaypointScript","type":"command","url":"https://community.bistudio.com/wiki/setWaypointScript","revid":377760,"updated":"2026-01-03T00:58:20Z","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":null,"effect":null,"server_exec":false},"exec":null,"description":"Attaches a script to a scripted waypoint. In early versions of Arma, command consisted of a script name and additional script arguments and the script had to use SQS Syntax. The script receives the following arguments in _this variable: [group, position, target] + [the optional passed arguments]. The optional arguments are appended to the end of the arguments array.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, *command* argument can be a reference to .sqf script (it will have to explicitly end with **`.sqf`**) or a reference to `.sqs` script.","syntaxes":[{"syntax":"waypoint setWaypointScript command","since":null,"effect":null,"exec":null,"params":[{"name":"waypoint","type":"Waypoint","optional":false,"default":null,"description":null,"types":["Waypoint"],"since":null,"text":"waypoint: Waypoint"},{"name":"command","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"command: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"waypoint","types":["Waypoint"]},"right":{"text":"command","types":["String"]}}],"examples":[{"text":"```sqf\n[_grp, 2] setWaypointScript \"find.sqs player\";\n```","code":["[_grp, 2] setWaypointScript \"find.sqs player\";"]},{"text":"```sqf\n[_grp, 2] setWaypointScript \"somescript.sqf [1,2,3,4,5,6,7,8]\";\n```","code":["[_grp, 2] setWaypointScript \"somescript.sqf [1,2,3,4,5,6,7,8]\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"],"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: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}