silentleopard 1 Posted May 25, 2020 I'm new to eden editor and I started making SP missions. I learned a few things on my own but I would like to know how to activate a trigger as the player opens a crate and looks in it's inventory. Share this post Link to post Share on other sites
opusfmspol 282 Posted May 25, 2020 My thought would be: User Interface Event Handlers: onLoad Share this post Link to post Share on other sites
Harzach 2517 Posted May 25, 2020 Or perhaps ContainerOpened. Place this in your crate's init field: crateOpen = false; this addEventHandler ["ContainerOpened", { params ["_container", "_unit"]; crateOpen = true; }]; Place a trigger, change the condition field to "openCrate," then put whatever you need in the onAct field. Depending on what you are doing, you might not even need the trigger. *edit* - basically the same as M1ke_SK's example, only I'm using a global variable instead of setting a variable on the object. 1 Share this post Link to post Share on other sites
M1ke_SK 230 Posted May 25, 2020 1. name your container in editor "container1" (without quotes) 2. put this code to initServer.sqf in mission root directory (if it does not exist, create one) //initServer.sqf container1 addEventHandler ["ContainerOpened", { params ["_container", "_unit"]; _container setVariable ["opened", true, true]; }]; 3. put in condition of your trigger this code container1 getVariable ["opened", false] 4. profit 2 Share this post Link to post Share on other sites