S4Mz 10 Posted June 18, 2011 Hello Im looking for a script in which I as a pilot can get into a blackhawk chopper and be able to drop a custom ammo box from my chopper for my other players to be able to use if they need more ammunition and then obviously it despawn after a appropriate amount of time. Im not looking for anything to fancy like it falling with an parachute although it would be nice it would add to the realism of my mission but I would be happy with it just to eb able to drop out of the chopper and fall to the ground :) Thanks! Share this post Link to post Share on other sites
demonized 20 Posted June 18, 2011 place in init of heli, so only pilot can see it. _idx = this addAction ["Drop ammobox", "dropAmmo.sqf", [], 0, false, true, "", "driver _target == _this"]; create a script named dropAmmo.sqf in it place this: Dropping_Ammo = true; publicVariable "Dropping_Ammo"; Dropper_array = [(_this select 1)]; publicVariable "Dropper_array"; in init.sqf place this: Dropping_Ammo = false; Dropper_array = []; now have a repeated trigger and in condition: Dropping_Ammo in on act: Dropping_Ammo = false; publicVariable "Dropping_Ammo"; _null = [] spawn { if (isServer) exitWith {}; waitUntil {(count Dropper_array) != 0}; _dropper = Dropper_array select 0; _box = "USBasicWeaponsBox" createVehicleLocal [getPos (vehicle _dropper) select 0, getPos (vehicle _dropper) select 1, (getPos (vehicle _dropper) select 2) - 2]; if ((getPos _box select 2) < 0) then {_box setPos [getpos _box select 0, getPos _box select 1, 0]; _null = _box execVM "ammoFillerScriptOfChoise.sqf"; Dropper_array = []; publicVariable "Dropper_array"; }; change the higlighted ammobox name for your box of choise, this one is A2 usmc type. change the higlighted "ammoFillerScriptOfChoise.sqf" to whatever ammo filler script of choise, there are many out there. untested, but should work, let me know and ill test myself if its not working. Share this post Link to post Share on other sites
S4Mz 10 Posted June 18, 2011 (edited) Tested it out and what you put in the act of the trigger comes up with a blank error... Edited June 18, 2011 by S4Mz Share this post Link to post Share on other sites
hungrytoheal 10 Posted June 18, 2011 Try creating a script. On activation: _name exec nameofscript.sqs Dropping_Ammo = false; publicVariable "Dropping_Ammo"; _null = [] spawn { if (isServer) exitWith {}; waitUntil {(count Dropper_array) != 0}; _dropper = Dropper_array select 0; _box = "USBasicWeaponsBox" createVehicleLocal [getPos (vehicle _dropper) select 0, getPos (vehicle _dropper) select 1, (getPos (vehicle _dropper) select 2) - 2]; if ((getPos _box select 2) < 0) then {_box setPos [getpos _box select 0, getPos _box select 1, 0]; _null = _box execVM "ammoFillerScriptOfChoise.sqf"; Dropper_array = []; publicVariable "Dropper_array"; }; Share this post Link to post Share on other sites
1para{god-father} 105 Posted June 18, 2011 If I was U just download the following script ! http://www.armaholic.com/page.php?id=10834 That will do what you need and more ! Share this post Link to post Share on other sites