getEventHandlerInfo

From Bohemia Interactive Community
Revision as of 18:17, 18 July 2022 by Lou Montana (talk | contribs) (Some wiki formatting)
Jump to navigation Jump to search
Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.10.

Description

Description:
Queries given event handler's information.
Groups:
Event Handlers

Syntax

Syntax:
entity getEventHandlerInfo [type, id]
Parameters:
entity: Object, Group, Control or Display - entity to which event handler is assigned
type: String - event handler name
id: Number - event handler id returned by addEventHandler, ctrlAddEventHandler, displayAddEventHandler, or addMPEventHandler
Return Value:
Array in format [exists, isLast, total] or empty array [], where:
  • exists: Boolean - event handler exists
  • isLast: Boolean - will be executed last (relevant if last event handler modifies default engine behaviour)
  • total: Number - total number of event handlers added to the same event

Alternative Syntax

Syntax:
getEventHandlerInfo [type, id]
Parameters:
type: String - event handler name
id: Number - event handler id returned by addMissionEventHandler or addMusicEventHandler
Return Value:
Array in format [exists, isLast, total] or empty array [], where:
  • exists: Boolean - event handler exists
  • isLast: Boolean - will be executed last (relevant if last event handler modifies default engine behaviour)
  • total: Number - total number of event handlers added to the same event

Examples

Example 1:
private _info = player getEventHandlerInfo ["MPKilled", 1];
Example 2:
private _info = getEventHandlerInfo ["EachFrame", 0];

Additional Information

See also:
addEventHandler ctrlAddEventHandler displayAddEventHandler addMPEventHandler addMissionEventHandler addMusicEventHandler

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