Fandom

武装突袭 Wiki

BIS_fnc_addStackedEventHandler

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

Introduced with Arma 3 version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.00

Description

Description:
Stack an event handler. Possible event handlers are:

Syntax

Syntax:
[key, event, code, arguments] call BIS_fnc_addStackedEventHandler;
Parameters:
key: String - unique identifier

event: String - event handler type, see Description

code: String or Code

arguments: Anything - arguments to make available in code
Return Value:
String

Examples

Example 1:
["someId", "onEachFrame", { hintSilent str time; }] call BIS_fnc_addStackedEventHandler;

Example 2:
["someId", "onEachFrame", { hintSilent str _this; }, "Hello world!"] call BIS_fnc_addStackedEventHandler;

Additional Information

Execution:
call
Multiplayer:
-
See also:

BIS_fnc_removeStackedEventHandler

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Posted on November 1, 2013
neokika
More info at: http://forums.bistudio.com/showthread.php?167822-Stacked-event-handlers-OnEachFrame-OnPlayerConnected-etc

Posted on February 11, 2014

Posted on 25 Jun, 2014
ffur2007slx2_5
(ArmA3 1.22) Stack all codes into one PFH will be less demanding than separated calling within multiple PFH. E.g. { [(format [“%1”,_forEachIndex]),”onEachFrame”,_code,[_x]] call BIS_fnc_addStackedEventHandler; } forEach [var0…var100]; //pretty demanding [_id, ”onEachFrame”,{

 {_x call _code} forEach [var0…var100];

}] call BIS_fnc_addStackedEventHandler; //faster

Bottom Section

Posted on December 8, 2014 - 08:21 (UTC)
DreadedEntity
It is not possible to override default engine behavior with stacked event handlers. This is because BIS_fnc_executeStackedEventHandler, a function that is called inside BIS_fnc_addStackedEventHandler, always returns false.

Posted on December 8, 2014 - 20:56 (UTC)
DreadedEntity
You cannot use stacked EH's and non-stacked EH's (just the normal commands, onEachFrame/onMapSingleClick/etc.) of the same event together because BIS_fnc_addStackedEventHandler utilizes these commands in it's code, overwriting a non-stacked EH. Redefining a non-stacked EH will also overwrite all stacked EH's (in that particular event).

Stacked Event Handlers are saved to missionNamespace whenever a new one is added, to view them use: hint str (missionNamespace getVariable ["BIS_stackedEventHandlers_XXX",[]]); where "XXX" is each event name ("onEachFrame", "onPreloadStarted", "onPreloadFinished", "onMapSingleClick", "onPlayerConnected", "onPlayerDisconnected")

更多维基

随机维基