displayAddEventHandler and displaySetEventHandler has no effect since Arma 3. {F18345}
Description
Description
Details
Details
- Legacy ID
- 1157018863
- Severity
- Minor
- Resolution
- Not A Bug
- Reproducibility
- Always
- Category
- Scripting
Steps To Reproduce
- attached example mission
Event Timeline
Comment Actions
The main display (46) doesn't exist until a few moments after the mission has started. This has been the case in ARMA 2 as well.
Prior to attempting to assign a display event handler you have to make sure the display actually exists using an isNull check:
<i>
waitUntil{!isNull(findDisplay 46)};
(findDisplay 46) displayAddEventHandler ["keyDown", "hint str _this; false"];
</i>
This makes your mission work as expected on my end.