getEventHandlerInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
|p4= mpEvent (Optional): [[Boolean]] - use [[true]] for event handlers added with [[addMPEventHandler]], default [[false]]
|p4= mpEvent (Optional): [[Boolean]] - use [[true]] for event handlers added with [[addMPEventHandler]], default [[false]]


|r1= [[Array]] - in format [exists, isLast, total], where:
|r1= [[Array]] - in format [exists, isLast, total] or empty array [], where:
* exists: [[Boolean]] - event handler exists
* exists: [[Boolean]] - event handler exists
* isLast: [[Boolean]] - will be executed last (relevant if last event handler modifies default engine behaviour)
* isLast: [[Boolean]] - will be executed last (relevant if last event handler modifies default engine behaviour)

Revision as of 17:04, 6 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, whether or not it exists and is last. Also returns total number of event handlers assigned to the same event.
Groups:
Event Handlers

Syntax

Syntax:
object getEventHandlerInfo [type, id, mpEvent]
Parameters:
object: Object - entity to which EH is assigned
type: String - event handler name
id: Number - event handler id
mpEvent (Optional): Boolean - use true for event handlers added with addMPEventHandler, default false
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:
_info = player getEventHandlerInfo ["MPKilled", 1, true];

Additional Information

See also:
addMPEventHandler addEventHandler

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