Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description: Terminates (aborts) the specified script. This can be a function called via spawn or a script file called via execVM.

The script will stop executing at its current command, and exit without executing any remaining commands.

There is a minor delay (about .02 sec) before the scriptDone status for terminated scripts is set to true.

Syntax

Syntax: terminate scriptHandle
Parameters:
Return Value: Nothing

Examples

Examples: Terminating an external script:
_handle = [] execVM "script.sqf";
Sleep 5;
terminate _handle;
Terminating a spawned loop:
_handle = [] spawn {
  while {true} do {
    hint str time;
  };
  // this line will never execute, as the termination happens within the waitUntil loop
  hint "function done"; 
};
sleep 5;
terminate _handle;

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes