Learthane 10 Posted September 26, 2015 Hello, I am making a mission where the players have x amount of time to access a virtual arsenal to grab their gear for the mission. After the players have begun the mission, I would like to have the ammo box to be deleted so that people cannot go back and re-equip their gear during the battle. If this is possible, then would it be possible to have other boxes spawn like ammo boxes from the base game that do not contain the virtual arsenal so that people still have a way to obtain ammo throughout the fight? Thanks Share this post Link to post Share on other sites
R3vo 2654 Posted September 26, 2015 waitUntil {sleep 0.5; time > 60}; //Will delete the box ~60 seconds after mission start deleteVehicle _ammoBox; You can create other ammoboxes with this command https://community.bistudio.com/wiki/createVehicle Share this post Link to post Share on other sites
Learthane 10 Posted September 26, 2015 waitUntil {sleep 0.5; time > 60}; //Will delete the box ~60 seconds after mission start deleteVehicle _ammoBox; Would I put this in the ammobox's init field? Sorry I am kinda new to mission editing. Share this post Link to post Share on other sites
R3vo 2654 Posted September 26, 2015 Sorry I am kinda new to mission editing. No problem, that's why this part of the forum exists. If you put it into the init of the ammobox, then replace _ammoBox with THIS (small letters) Share this post Link to post Share on other sites
schadler17 36 Posted September 26, 2015 Make a .sqf file and add this too it. private ["_box"]; _box = _this select 0; waitUntil {sleep 0.5; time > 60}; //Will delete the box ~60 seconds after mission start deleteVehicle _box; Call for it by putting this in the init field of the box [this] execVM "myscript.sqf"; Or an easier way is doing what Revo said. Share this post Link to post Share on other sites
Learthane 10 Posted September 26, 2015 Using Revo's method, the box definitely is deleted but instead the box being deleted after ~60s, it is immediately deleted. I copy and pasted the code into the init field but removed the "//Will delete the box ~60 seconds after mission start" That leaves me with everything else looking correct. Any idea of what I could be doing wrong? Share this post Link to post Share on other sites
R3vo 2654 Posted September 26, 2015 Well, that's my fault. I believe script suspension is not possible in the init field. Use schadler17's suggestion. Share this post Link to post Share on other sites
Magirot 14 Posted September 26, 2015 (edited) I believe script suspension is not possible in the init field. You can use spawn there, though: nul = this spawn { sleep 60; deleteVehicle _this; }; Edit: Forgot the handle. Edited September 26, 2015 by Magirot Share this post Link to post Share on other sites
Joe98 91 Posted September 26, 2015 When a person is new to editing a script is very difficult. I find 98% of things do not need a script. Place a soldier on the map. Place a box on the map and name it box1 Place a trigger on the map. Activation is set to Anybody, Once and Present. In the On Act field type Hint “ON ON ONâ€; deletevehicle box1; Walk into the trigger area and watch the message come up ON ON ON and at the same time the box disappears. You want a delay of 60 secs before the box disappears. In the trigger select Timeout and in the 3 cells input 60, 60 and 60 Walk into the trigger area. Wait 60 secs the message appears and the box disappears! . Share this post Link to post Share on other sites