Fandom

武装突袭 Wiki

OnEachFrame

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 2: Operation Arrowhead
版本:
1.63

描述

描述:
Runs given statement every frame.

i Since Arma 3 v1.57 a stackable version of this EH is available: EachFrame
Arma 3 logo black.png In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.

基本句法

句法:
onEachFrame statement
参数:
statement: String or Code
返回值:
Nothing

范例

范例1:
onEachFrame { hintSilent str position player}; //Hints position every frame

范例2:
Private variables defined outside of onEachFrame scope are not inherited: _myvar = "bob"; myvar = "bill"; onEachFrame {hintSilent str [_myvar, myvar]}; //Result: [any,"bill"]

范例3:
Only one onEachFrame loop can exist at any time: onEachFrame {player sideChat "first"}; onEachFrame {player sideChat "second"}; //Result: "second","second","second"..."second"

Note how "first" never gets shown even though it precedes "second". This is because script thread is executing within the same frame and first onEachFrame is overwritten before it has a chance to execute its statement.

范例4:
Script suspension is not permitted within onEachFrame scope: onEachFrame {sleep 1}; //ERROR!!!

额外资讯

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

diag_frameNodiag_fps

注意事项

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

Notes

Posted on 21 Dec, 2012
neokika
onEachFrame {}; //Reset event

Bottom Section

更多维基

随机维基