getEventHandlerInfo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
No edit summary |
||
Line 33: | Line 33: | ||
* 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> | |x1= <sqf>_info = player getEventHandlerInfo ["MPKilled", 1]; // object EH</sqf> | ||
|x2= <sqf>_info = getEventHandlerInfo ["EachFrame", 0]; // mission EH</sqf> | |||
|x2= <sqf> | |x3= <sqf>_info = _bullet getEventHandlerInfo ["Deflected", 0]; // projectile EH</sqf> | ||
|x4= <sqf>_info = _group getEventHandlerInfo ["EnemyDetected", 1]; // group EH</sqf> | |||
|x5= <sqf>_info = _control getEventHandlerInfo ["ButtonClick", 1]; // control (UI) EH</sqf> | |||
|seealso= [[addEventHandler]] [[ctrlAddEventHandler]] [[displayAddEventHandler]] [[addMPEventHandler]] [[addMissionEventHandler]] [[addMusicEventHandler]] | |seealso= [[addEventHandler]] [[ctrlAddEventHandler]] [[displayAddEventHandler]] [[addMPEventHandler]] [[addMissionEventHandler]] [[addMusicEventHandler]] | ||
}} | }} |
Revision as of 18:19, 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:
- 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