getEventHandlerInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(update supported types)
Line 13: Line 13:




|s1= object [[getEventHandlerInfo]] [type, id]
|s1= entity [[getEventHandlerInfo]] [type, id]


|p1= object: [[Object]] - entity to which event handler is assigned
|p1= entity: [[Object]], [[Group]], [[Control]], [[Display]] - entity to which event handler is assigned


|p2= type: [[String]] - event handler name
|p2= type: [[String]] - event handler name


|p3= id: [[Number]]  - event handler id returned by [[addEventHandler]] or [[addMPEventHandler]]
|p3= id: [[Number]]  - event handler id returned by [[addEventHandler]], [[ctrlAddEventHandler]], [[displayAddEventHandler]], or [[addMPEventHandler]]


|r1= [[Array]] - see description
|r1= [[Array]] - see description

Revision as of 16:49, 18 July 2022

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 and returns 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
Groups:
Event Handlers

Syntax

Syntax:
entity getEventHandlerInfo [type, id]
Parameters:
entity: Object, Group, Control, 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 - see description

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 - see description

Examples

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

Additional Information

See also:
addMPEventHandler addEventHandler 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