getEventHandlerInfo: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "\|branch= *dev " to "") |
||
(10 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.10 | |version1= 2.10 | ||
|gr1= Event Handlers | |gr1= Event Handlers | ||
|descr= Queries given event handler | |descr= Queries given event handler's information. | ||
|s1= | |s1= oper [[getEventHandlerInfo]] [type, id] | ||
|p1= | |p1= oper: [[Object]], [[Group]], [[Control]] or [[Display]] - subject 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] | |||
|p21= type: [[String]] - event handler name | |||
|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 | * 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) | ||
* 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>_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> | |||
|x3= <sqf>private _info = _bullet getEventHandlerInfo ["Deflected", 0]; // projectile EH</sqf> | |||
|x4= <sqf>private _info = _group getEventHandlerInfo ["EnemyDetected", 1]; // group EH</sqf> | |||
|x5= <sqf>private _info = _control getEventHandlerInfo ["ButtonClick", 1]; // control (UI) EH</sqf> | |||
|seealso= [[addMPEventHandler]] [[ | |seealso= [[addEventHandler]] [[ctrlAddEventHandler]] [[displayAddEventHandler]] [[addMPEventHandler]] [[addMissionEventHandler]] [[addMusicEventHandler]] | ||
}} | }} |
Latest revision as of 13:23, 23 August 2022
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
- 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