BIS fnc execVM: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Fix Script link) |
||
(26 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| arma3 | | |game1= arma3 | ||
|version1= 1.00 | |||
| | |gr1= Program Flow | ||
| | |eff= local | ||
| | |descr= {{Feature|obsolete|use [[remoteExec]]/[[remoteExecCall]] instead.|arma3|1.50}} | ||
[[execVM]] desired script with desired argument(s). This function is only really useful when combined with [[BIS_fnc_MP]] to execute a script remotely. | |||
|[[ | |s1= filename call [[BIS_fnc_execVM]] | ||
| filename | |p1= filename: [[String]] | ||
| | |r1= [[Script Handle]] - can be used to determine (via [[scriptDone]]) when the script has finished. | ||
| [ | |s2= [arguments, filename] call [[BIS_fnc_execVM]] | ||
| | |p21= arguments: [[Anything]] - arguments are passed to script as magic variable [[Magic Variables#this|_this]]. | ||
| | |p22= filename: [[String]] | ||
| | |r2= [[Script Handle]] - can be used to determine (via [[scriptDone]]) when the script has finished. | ||
| | |x1= <sqf>"Bonus\initializeExtras.sqf" call BIS_fnc_execVM;</sqf> | ||
| | |x2= <sqf>[player, "reposition.sqf"] call BIS_fnc_execVM;</sqf> | ||
| | |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> | |||
| [[BIS_fnc_execFSM]] | |seealso= [[BIS_fnc_execFSM]] [[BIS_fnc_execRemote]] [[BIS_fnc_spawn]] [[BIS_fnc_call]] | ||
}} | }} | ||
Latest revision as of 09:50, 29 December 2022
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.
- Execution:
- call
- Groups:
- Program Flow
Syntax
- Syntax:
- filename call BIS_fnc_execVM
- Parameters:
- filename: String
- Return Value:
- Script Handle - can be used to determine (via scriptDone) when the script has finished.
Alternative Syntax
- Syntax:
- [arguments, filename] call BIS_fnc_execVM
- Parameters:
- arguments: Anything - arguments are passed to script as magic variable _this.
- filename: String
- Return Value:
- Script Handle - can be used to determine (via scriptDone) when the script has finished.
Examples
- Example 1:
- Example 2:
- 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
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