Fandom

武装突袭 Wiki

ExecVM

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

  

点击图片可看到更多讯息

开始使用于

游戏:
Armed Assault
版本:
1.00

描述

描述:
Compiles and adds SQF Script to the scheduler queue and returns script handle. The script is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. The script does not execute immediately upon running execVM command, but with some delay. How much delay is unknown as it largely depends on how many other scripts there are in the queue and how busy is VM. The optional argument is passed to the script in private variable _this. In Arma 3 the script handle is also passed to the script in _thisScript variable.

基本句法

句法:
argument(s) execVM filename
参数:
argument(s): Any Value(s) - Argument(s) accessible as _this in the script

filename: String - file with sqf code
返回值:
Script Handle - can be used to determine (via scriptDone (also via isNull in Arma 3)) when the execVMed script has finished. In Arma 3, the handle is also available inside the execVMed script in _thisScript variable.

替代句法

句法:
execVM filename
参数:
filename: String - file with sqf code
返回值:
Script Handle - can be used to determine (via scriptDone (also via isNull in Arma 3)) when the execVMed script has finished. In Arma 3, the handle is also available inside the execVMed script in _thisScript variable.

范例

范例1:
_handle = execVM "test.sqf";

范例2:
_handle = player execVM "test.sqf"; waitUntil {scriptDone _handle};

范例3:
In Arma 3 this is also possible: _handle = execVM "123.sqf"; waitUntil {isNull _handle};

范例4:
[4] execVM "showDamage.sqf"; // showDamage.sqf _damage = _this select 0; hint format ["%1", _damage];

额外资讯

多人游戏:
-
也可以看看:

callspawnexecexecFSMscriptDonescriptNullterminatesleepuiSleepwaitUntilcanSuspendSQF syntaxControl Structures

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Notes

Posted on November 23, 2010 - 15:56
Kabilen
Passing variables to the script file

To pass multiple variables to the script file, use an array e.g:

null = [myunit,1234] execVM "test.sqf";

Now within test.sqf to access the elements, use the following:

_myunit = _this select 0;
_myvar = _this select 1;



Notes

Bottom Section

更多维基

随机维基