Page MenuHomeFeedback Tracker

displayAddEventHandler has no effect
Closed, ResolvedPublic

Description

displayAddEventHandler and displaySetEventHandler has no effect since Arma 3. {F18345}

Details

Legacy ID
1157018863
Severity
Minor
Resolution
Not A Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  • attached example mission

Event Timeline

Psychobastard edited Additional Information. (Show Details)
Psychobastard set Category to Scripting.
Psychobastard set Reproducibility to Always.
Psychobastard set Severity to Minor.
Psychobastard set Resolution to Not A Bug.
Psychobastard set Legacy ID to 1157018863.May 7 2016, 1:01 PM

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.

Ok, it works for me too. My mistake - can be closed.