BIS fnc addScriptedEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (see also)
No edit summary
Line 49: Line 49:
[[Category:Functions|{{uc:addScriptedEventHandler}}]]
[[Category:Functions|{{uc:addScriptedEventHandler}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:addScriptedEventHandler}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:addScriptedEventHandler}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on May 15, 2016 - 19:13 (UTC)</dd>
<dt class="note">[[User:RageBone|RageBone]]</dt>
<dd class="note">
Example:<br>
<code>
_index = [missionNamespace,"event",{someCode = "Hello World";}] call bis_fnc_addScriptedEventhandler; <br> //_index == 0<br>
_index = [missionNamespace,"event","hint someCode;"}] call bis_fnc_addScriptedEventhandler; <br>// _index == 1<br>
//executing will hint "hello world".<br>
[missionNamespace,"event",[]] call bis_fnc_callScriptedEventHandler;
</code><br>
Note that this is capable of stacking code, the order of stacking code matters!
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 21:13, 15 May 2016


Hover & click on the images for description

Description

Description:
/*

	Description:
	Add scripted event handler

	Parameter(s):
		0: NAMESPACE, OBJECT, GROUP or LOCATION - namespace in which handler is saved
		1: STRING - handler name
		2: CODE or STRING - code executed upon calling

	Returns:
	NUMBER - handler ID
*/
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:

Additional Information

See also:
BIS_fnc_callScriptedEventHandler

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

Notes

Bottom Section

Posted on May 15, 2016 - 19:13 (UTC)
RageBone
Example:
_index = [missionNamespace,"event",{someCode = "Hello World";}] call bis_fnc_addScriptedEventhandler;
//_index == 0
_index = [missionNamespace,"event","hint someCode;"}] call bis_fnc_addScriptedEventhandler;
// _index == 1
//executing will hint "hello world".
[missionNamespace,"event",[]] call bis_fnc_callScriptedEventHandler;

Note that this is capable of stacking code, the order of stacking code matters!