ContainerOpened eventhandler not firing when a player accesses the inventory of a dead unit with this eventhandler attached to it.
The "ContainerClosed" EH does work as expected
Both Eventhandlers work as expected when added to an ammo crate
ContainerOpened eventhandler not firing when a player accesses the inventory of a dead unit with this eventhandler attached to it.
The "ContainerClosed" EH does work as expected
Both Eventhandlers work as expected when added to an ammo crate
Create a unit
Add the following into the init field of the unit
this setdamage 1;
this addeventhandler ["ContainerOpened", {systemchat "Debug: EH Container Opened"}];
this addeventhandler ["ContainerClosed", {systemchat "Debug: EH Container Closed"}];
or name the unit U1 and add the following code to the init.sqf
u1 setdamage 1;
u1 addeventhandler ["ContainerOpened", {systemchat "Debug: EH Container Opened"}];
u1 addeventhandler ["ContainerClosed", {systemchat "Debug: EH Container Closed"}];
Approach the unit and open its inventory either using the "I" key or via the action menu