{"name":"BIS_fnc_callScriptedEventHandler","title":"BIS fnc callScriptedEventHandler","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_callScriptedEventHandler","revid":327926,"updated":"2022-07-13T12:24:31Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Calls all the codes assigned to scripted event handler with given name. Since Arma 3 v1.68 the code receives current EH id in the special variable: `_thisScriptedEventHandler`","syntaxes":[{"syntax":"[namespace, name, arguments, returnResults] call BIS_fnc_callScriptedEventHandler","params":[{"name":"namespace","type":"Namespace, Object, Group, Location, Boolean, Control or Display","description":"namespace in which handler is saved","type_expr":"Namespace | Object | Group | Location | Boolean | Control | Display"},{"name":"name","type":"String","description":"handler name","type_expr":"String"},{"name":"arguments","type":"Array","description":"array of arguments passed to the EH code","type_expr":"Array"},{"name":"returnResults","type":"Boolean","optional":true,"default":"false","description":"if true EH will place results from each code execution into an array using EH id as index","type_expr":"Boolean","text":"returnResults: Boolean - (Optional, default false) if true EH will place results from each code execution into an array using EH id as index"}],"returns":{"type":"Array","type_expr":"Array","description":"array with EH results or empty array"}}],"examples":[{"code":["[missionNamespace, \"event\", [player, 123]] call BIS_fnc_callScriptedEventHandler;"]}],"see_also":["BIS_fnc_addScriptedEventHandler","BIS_fnc_removeScriptedEventHandler","BIS_fnc_removeAllScriptedEventHandlers"]}