Page MenuHomeFeedback Tracker

addEventHandler does not work for eden entity of type "trigger"
Closed, ResolvedPublic

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
Scripting
Steps To Reproduce

Select a trigger and execute:

get3DENSelected "Trigger" #0 addEventHandler ["Dragged3DEN", { 
 params ["_object"]; 
}];

Notice how it returns -1.

Event Timeline

R3vo created this task.Mar 12 2024, 5:14 PM
dedmen closed this task as Resolved.Mar 15 2024, 9:29 AM
dedmen claimed this task.
dedmen added a subscriber: dedmen.

True. That is because Triggers themselves don't have a eventhandler collection on them.
These Eden events re-use the event handling already present on objects.
Its not really worth it to add it just for that, and also as you said wouldn't work on Markers either.

Workaround is available though
https://community.bistudio.com/wiki/Arma_3:_Eden_Editor_Event_Handlers
All the entity specific events should also be available as global ones?
You might have to filter the entity.
Might be worth noting that on wiki too