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



Introduced in

Version:2.00

Description

Description:Defines a name to a script which is returned, when the script is called using execVM or spawn.

This name can then be used in debug or monitoring messages. Once the script finishes, the name is gone, and the handle only returns <NULL-script>, and scriptDone _handle is true.

Syntax

Syntax:scriptName name
Parameters:
  • name: String - Name to return.
Return Value:Nothing

Examples

Examples:
/* content of script "tst1.sqf": */
// define the script's name: "COUNTDOWN"
scriptName "COUNTDOWN";

// let it loop for 3 seconds
_start = time;
waitUntil {
  hint "script running";
  (time-_start>3)
};
hint "script done";

/* content of other script, which is calling "tst1.sqf": */
// call the script "tst1.sqf", and use its handle
_script = [] execVM "tst1.sqf";

// while the called script is working, and display its name and the time
waitUntil {
  player sidechat format["script %1 running (%2)",_script,round time];
  scriptDone _script
};
player sidechat format["script finished: %1 (%2)",_script,scriptDone _script];

Additional Information

See also: execVM, spawn
Multiplayer:
Problems:

Notes