BIS fnc execVM: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)<nowiki\/>\[\[([a-zA-Z0-9_]+)\]\](.*)<\/code>" to "<code>$1$2$3</code>")
m (Some wiki formatting)
Line 9: Line 9:


|descr=[[execVM]] desired script with desired argument(s). This function is only really useful when combined with [[BIS_fnc_MP]] to execute a script remotely.
|descr=[[execVM]] desired script with desired argument(s). This function is only really useful when combined with [[BIS_fnc_MP]] to execute a script remotely.
{{Feature|arma3|Since {{GVI|arma3|1.50}}, use [[remoteExec]]/[[remoteExecCall]] instead.}}


|s1= filename call [[BIS_fnc_execVM]]
|s1= filename call [[BIS_fnc_execVM]]
Line 26: Line 27:
|x1= <sqf>"Bonus\initializeExtras.sqf" call BIS_fnc_execVM;</sqf>
|x1= <sqf>"Bonus\initializeExtras.sqf" call BIS_fnc_execVM;</sqf>


|x2= <code>[player,"reposition.sqf"] call [[BIS_fnc_execVM]];</code>
|x2= <sqf>[player,"reposition.sqf"] call BIS_fnc_execVM;</sqf>


|x3= <code><nowiki>[[</nowiki>[_param1, _param2], "addBonus.sqf"], "[[BIS_fnc_execVM]]", [[true]]] call [[BIS_fnc_MP]];</code>
|x3= <sqf>
// before Arma 3 v1.50
[[[_param1, _param2], "addBonus.sqf"], "BIS_fnc_execVM", true] call BIS_fnc_MP;
 
// since Arma 3 v1.50
[[_param1, _param2], "addBonus.sqf"] remoteExec ["execVM"];
</sqf>


|seealso= [[BIS_fnc_execFSM]] [[BIS_fnc_execRemote]] [[BIS_fnc_spawn]] [[BIS_fnc_call]]
|seealso= [[BIS_fnc_execFSM]] [[BIS_fnc_execRemote]] [[BIS_fnc_spawn]] [[BIS_fnc_call]]
}}
}}

Revision as of 17:19, 13 July 2022

Hover & click on the images for description

Description

Description:
execVM desired script with desired argument(s). This function is only really useful when combined with BIS_fnc_MP to execute a script remotely.
Arma 3
Since Arma 3 logo black.png1.50, use remoteExec/remoteExecCall instead.
Execution:
call
Groups:
Program Flow

Syntax

Syntax:
filename call BIS_fnc_execVM
Parameters:
filename: String
Return Value:
Script - script handle, which can be used to determine (via scriptDone) when the script has finished.

Alternative Syntax

Syntax:
[argument(s), filename] call BIS_fnc_execVM
Parameters:
argument(s): Anything - Arguments are passed to script as magic variable _this.
filename: String
Return Value:
Script - script handle, which can be used to determine (via scriptDone) when the script has finished.

Examples

Example 1:
"Bonus\initializeExtras.sqf" call BIS_fnc_execVM;
Example 2:
[player,"reposition.sqf"] call BIS_fnc_execVM;
Example 3:
// before Arma 3 v1.50 [[[_param1, _param2], "addBonus.sqf"], "BIS_fnc_execVM", true] call BIS_fnc_MP; // since Arma 3 v1.50 [[_param1, _param2], "addBonus.sqf"] remoteExec ["execVM"];

Additional Information

See also:
BIS_fnc_execFSM BIS_fnc_execRemote BIS_fnc_spawn BIS_fnc_call

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note