getEventHandlerInfo: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\|branch= *dev " to "") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
| Line 14: | Line 14: | ||
|p2= type: [[String]] - event handler name | |p2= type: [[String]] - event handler name | ||
|p3= id: [[Number]] - event handler id returned by [[addEventHandler]], [[ctrlAddEventHandler]], [[displayAddEventHandler]], or [[addMPEventHandler]] | |p3= id: [[Number]] - event handler id returned by [[addEventHandler]], [[ctrlAddEventHandler]], [[displayAddEventHandler]], or [[addMPEventHandler]] - '''not''' [[add3DENEventHandler]] | ||
|r1= [[Array]] in format [exists, isLast, total] or empty array [], where: | |r1= [[Array]] in format [exists, isLast, total] or empty array [], where: | ||
| Line 32: | Line 32: | ||
* total: [[Number]] - total number of event handlers added to the same event | * total: [[Number]] - total number of event handlers added to the same event | ||
|x1= <sqf>private _info = player getEventHandlerInfo ["MPKilled", 1]; | |x1= <sqf>private _info = player getEventHandlerInfo ["MPKilled", 1]; // object EH</sqf> | ||
|x2= <sqf>private _info = getEventHandlerInfo ["EachFrame", 0]; // mission EH</sqf> | |x2= <sqf>private _info = getEventHandlerInfo ["EachFrame", 0]; // mission EH</sqf> | ||
Revision as of 19:10, 10 November 2025
Description
- Description:
- Queries given event handler's information.
- Groups:
- Event Handlers
Syntax
- Syntax:
- oper getEventHandlerInfo [type, id]
- Parameters:
- oper: Object, Group, Control or Display - subject to which event handler is assigned
- type: String - event handler name
- id: Number - event handler id returned by addEventHandler, ctrlAddEventHandler, displayAddEventHandler, or addMPEventHandler - not add3DENEventHandler
- 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:
- Example 3:
- Example 4:
- Example 5:
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