Description
Execute given code with or without parameter.
Note
Arma 3: Since Arma 3 v1.50, use remoteExec/remoteExecCall instead.
Syntax
Syntax 1
[params, code] spawn BIS_fnc_spawn
Parameters:
Returns: Nothing
Syntax 2
code spawn BIS_fnc_spawn
Parameters:
code: Code
Returns: Nothing
Examples
Example 1
Show a message for the current player:
[["Hello"], { hint (_this select 0) }] spawn BIS_fnc_spawn;
Example 2
Show a message to all connected players:
[[["Hello"], { hint (_this select 0) }], "BIS_fnc_spawn", true, false, false] call BIS_fnc_MP; // obsolete, use remoteExec
["Hello", { hint (_this select 0) }] remoteExec ["BIS_fnc_spawn"]; // since the introduction of remoteExec
["Hello", { hint (_this select 0) }] remoteExec ["spawn"]; // BIS_fnc_spawn is obsolete
["Hello"] remoteExec ["hint"]; // best solution here
Example 3
{ hint "Hello" } spawn BIS_fnc_spawn;
See also
remoteExec · remoteExecCall · BIS_fnc_execFSM · BIS_fnc_execRemote · BIS_fnc_execVM · BIS_fnc_call