falconx1 13 Posted July 6, 2013 Is there a way to open an ammo crate if the ammo crate is no where near the player? i wanted to add an action to a player and have it open an ammo create Share this post Link to post Share on other sites
f2k sel 164 Posted July 6, 2013 One particular box or all boxes, for all boxes you would need to have a way to select the names of all the boxes. If it's for one box then just add an action to the player that opens the box ie box_1 player addaction ["Open " ,{player action ["GEAR",BOX_1]},[], 0, true, false, "", "(_this distance box_1)<300"] if you want access all the time remove the distance checks at the end. Share this post Link to post Share on other sites
Von Quest 1163 Posted July 24, 2013 How would you use this in a Radio Trigger? Need to use it just once OR only for a set Time. If I use a SQF and call it with trigger, the "Open" is always sitting in middle of screen. Would be nice to ONLY use Radio Trigger to OPEN Crate, then have the option gone after maybe 10 minutes or so. As is, you have to call with Radio, 0-0-Crate. THEN you get the "Open" option in your menu. You have to click again to actually use. But it never goes away... Currently trying to use as a second Backpack when using a Parachute to gear-up. Share this post Link to post Share on other sites
f2k sel 164 Posted July 24, 2013 Unable to test right now. remove after use. player addaction ["Open " ,{player removeaction (_this select 2) ; player action ["GEAR",BOX_1]},[], 0, true, false, "", "(_this distance box_1)<300"] ; if you want to stop the radio trigger as well you could name it radtrig1 player addaction ["Open " ,{deletevehicle radtrig1;player removeaction (_this select 2) ; player action ["GEAR",BOX_1]},[], 0, true, false, "", "(_this distance box_1)<300"] ; Also if you want it to work from anywhere then remove the distance check at the end. player addaction ["Open " ,{deletevehicle radtrig1;player removeaction (_this select 2) ; player action ["GEAR",BOX_1]},[], 0, true, false, "", ""] ; Downside of using radio trigger is that you can't detect who used it so you can't make it only work with the player who called it in MP. Share this post Link to post Share on other sites
Von Quest 1163 Posted July 24, 2013 Brilliant mate! This might be as close as I'm going to get (in beta anyway) for now. Been messing with this HALO thing all week. Will tinker with the MP side of things later. Thank you!!! :notworthy: Share this post Link to post Share on other sites
Zatan13th 10 Posted July 24, 2013 nah, it has limited ranged for interaction with ammobox. you might need to: 1.hide the box. 2.teleport the box to player's position. 3.force action to gear the box. 4. teleport the box back to origin, then unhidden. Share this post Link to post Share on other sites
kylania 568 Posted July 24, 2013 Oh, like a good Boy Scout, "Be Prepared!" :) Share this post Link to post Share on other sites
Tankbuster 1747 Posted August 20, 2019 This isn't quite working for me. The ammobox I'm using is actually a vehicle. The code works, but I get odd results in the inventory screen. Using the engine inventory, I get this, which is exactly what I expected. However, using your snippet, I get this. See how the FAK and IED aren't shown. Any ideas? Notice that the engine inventory says 'crate' top left and yours doesn't. Share this post Link to post Share on other sites