getEventHandlerInfo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 7: | Line 7: | ||
|gr1= Event Handlers | |gr1= Event Handlers | ||
|descr= Queries given event handler | |descr= Queries given event handler's information. | ||
|s1= entity [[getEventHandlerInfo]] [type, id] | |s1= entity [[getEventHandlerInfo]] [type, id] | ||
|p1= entity: [[Object]], [[Group]], [[Control]] | |p1= entity: [[Object]], [[Group]], [[Control]] or [[Display]] - entity to which event handler is assigned | ||
|p2= type: [[String]] - event handler name | |p2= type: [[String]] - event handler name | ||
|p3= id: [[Number]] | |p3= id: [[Number]] - event handler id returned by [[addEventHandler]], [[ctrlAddEventHandler]], [[displayAddEventHandler]], or [[addMPEventHandler]] | ||
|r1= [[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 | |||
|s2= [[getEventHandlerInfo]] [type, id] | |s2= [[getEventHandlerInfo]] [type, id] | ||
Line 28: | Line 26: | ||
|p21= type: [[String]] - event handler name | |p21= type: [[String]] - event handler name | ||
|p22= id: [[Number]] | |p22= id: [[Number]] - event handler id returned by [[addMissionEventHandler]] or [[addMusicEventHandler]] | ||
|r2= [[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 | |||
| | |x1= <sqf>private _info = player getEventHandlerInfo ["MPKilled", 1];</sqf> | ||
|x2= <sqf>private _info = getEventHandlerInfo ["EachFrame", 0];</sqf> | |||
|x2= <sqf>_info = getEventHandlerInfo ["EachFrame", 0];</sqf> | |||
|seealso= [[addEventHandler]] [[ctrlAddEventHandler]] [[displayAddEventHandler]] [[addMPEventHandler]] | |seealso= [[addEventHandler]] [[ctrlAddEventHandler]] [[displayAddEventHandler]] [[addMPEventHandler]] [[addMissionEventHandler]] [[addMusicEventHandler]] | ||
}} | }} |
Revision as of 18:17, 18 July 2022
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:
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:
Examples
- Example 1:
- Example 2:
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