{"name":"terminate","operator":null,"title":"terminate","type":"command","url":"https://community.bistudio.com/wiki/terminate","revid":376945,"updated":"2025-12-31T22:54:37Z","groups":["Program Flow"],"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":"Terminates (aborts) spawned or execVMed script.\n\n> [!IMPORTANT]\n> The given script will not terminate immediately upon terminate command execution, it will do so the next time the script is processed by the scheduler","syntaxes":[{"syntax":"terminate scriptHandle","since":null,"effect":null,"exec":null,"params":[{"name":"scriptHandle","type":"Script Handle","optional":false,"default":null,"description":null,"types":["Script Handle"],"since":null,"text":"scriptHandle: Script Handle"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"scriptHandle","types":["Script Handle"]}},{"syntax":"terminate FSMHandle","since":"arma3 2.18","effect":null,"exec":null,"params":[{"name":"FSMHandle","type":"Number","optional":false,"default":null,"description":"The FSM script must be launched with 'allowTermination' flag for this command to work (see execFSM).","types":["Number"],"since":null,"text":"FSMHandle: Number - The FSM script must be launched with 'allowTermination' flag for this command to work (see execFSM)."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"FSMHandle","types":["Number"]}},{"syntax":"scriptHandle terminate result","since":"arma3 2.22","effect":null,"exec":null,"params":[{"name":"scriptHandle","type":"Script Handle","optional":false,"default":null,"description":"Only \"Empty Handle\"'s can have their result set.","types":["Script Handle"],"since":null,"text":"scriptHandle: Script Handle - Only \"Empty Handle\"'s can have their result set."},{"name":"result","type":"Anything","optional":false,"default":null,"description":"The result to write into the Promise","types":["Anything"],"since":null,"text":"result: Anything - The result to write into the Promise"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"scriptHandle","types":["Script Handle"]},"right":{"text":"result","types":["Anything"]}}],"examples":[{"text":"```sqf\n_script = [] execVM \"script.sqf\";\nsleep 5;\nterminate _script;\n```","code":["_script = [] execVM \"script.sqf\";\nsleep 5;\nterminate _script;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["execVM","spawn","scriptDone","halt","execFSM"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Program Flow","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"]}