master_acer 10 Posted December 28, 2016 Hey everyone, I need help . How do I get it, that Arma 3 with a script pushes all objects from the vehicle into a crate? Property over google searched but nothing found. Thank you for your help. Acer p.s. My problem are filled backpacks :-( Share this post Link to post Share on other sites
Joe98 90 Posted December 28, 2016 how about begin the scenario with the correct items in the crate? Share this post Link to post Share on other sites
master_acer 10 Posted December 28, 2016 Hey Joe, I would like everyone to be able to exchange his backpack against a parachute, and if he can then jump off the pilot the complete inventory in the helicopter throw. The backpacks are all already in the Heli now she must however to a box (which I behind the Heli spawn) to throw these off. ace Share this post Link to post Share on other sites
killzone_kid 1326 Posted December 28, 2016 You should have said so in the first place. It is simple: player action ["DropBag", plane, backpack player]; player action ["AddBag", plane, "B_Parachute"] Share this post Link to post Share on other sites
master_acer 10 Posted December 28, 2016 As far as I have it, so I can not find any way I can push the complete inventory of the helicopter into a crate. ace My Code to copy Backpack to heli and Jump if ( vehicle player == player) exitWith { hint "Not in Vehicle!"; }; if ( _backpack != "" && _backpack != "B_Parachute" ) then { (unitBackpack player) setVariable ["backpackOwner", name player, true]; player action ["DropBag", vehicle player, typeOf unitBackpack player]; hint localize "$STR_BACKPACK_IN_CARGO"; }; sleep 0.5; player action ["eject", vehicle player]; sleep 0.1; if (_backpack != "B_Parachute" ) then { player addBackpack "B_Parachute"; }; Share this post Link to post Share on other sites
master_acer 10 Posted December 29, 2016 Nobody can help me? Share this post Link to post Share on other sites
R0adki11 3945 Posted December 29, 2016 10 minutes ago, master_acer said: Nobody can help me? perhaps learn to wait, it is the Christmas holidays... Share this post Link to post Share on other sites
Lucullus 71 Posted January 1, 2017 On 29.12.2016 at 0:20 AM, master_acer said: I would like everyone to be able to exchange his backpack against a parachute, and if he can then jump off the pilot the complete inventory in the helicopter throw. The backpacks are all already in the Heli now she must however to a box (which I behind the Heli spawn) to throw these off. I think the easiest way is: First store your loadout with setUnitLoadout. take Parachute from Heli-Cargo, enter the Heli, fly away. When it's time to jump off spawn Ammobox with Parachute behind the Heli. Add an Action to Ammobox with addaction and something like "Take your Backpack" and getUnitLoadout. Only the Ammobox must handled Serverside. Share this post Link to post Share on other sites
master_acer 10 Posted January 2, 2017 Hey Thanks, for getUnitLoadout and setUnitLoadout thats what i searched ace Share this post Link to post Share on other sites
master_acer 10 Posted January 2, 2017 Hi I m back ;-(, _loadout = getUnitLoadout _heli; _crate setUnitLoadout _loadout; GetUnitLoadout is only for Player and doesn't work with vehicles. Has yet another idea? Ace Share this post Link to post Share on other sites
master_acer 10 Posted January 3, 2017 @All Problem Solved, i have store the equipment in vehicle variable Ace Share this post Link to post Share on other sites
genesis92x 810 Posted January 3, 2017 I know the problem was solved...but this reminded me of a script I wrote awhile ago. I figured someone might make more use of it than I currently do. It was designed for moving a lot of items from multiple vehicles into a single box. You simply put down a trigger, and a box/object you want the things to go to. Anything inside the trigger will have its contents emptied and moved to the box. The script detects what is inside backpacks and empties them into the object as well. MoveStuff.sqf //This is a trigger. Anything inside this trigger will get items pulled from them into _Box. _VehiclesArray = list VehicleConversionZone; systemchat format ["%1",_VehiclesArray]; //The object we want the supplies to be dropped into. _Box = DropSupplyCrate; //Classnames the script should completely ignore. _IgnoreList = ["Logic","ModuleCurator_F","babe_helper","Sign_Arrow_F","Sign_Arrow_Yellow_F","Sign_Arrow_Green_F","Land_HelipadEmpty_F","Land_BottlePlastic_V2_F"]; _CompleteArray = []; { if !(_x isKindOf "MAN") then { _CN = typeof _x; if !(_CN in _IgnoreList) then { _WC = weaponCargo _x; if (isnil "_WC") then {_WC = [];}; _MC = magazineCargo _x; if (isnil "_MC") then {_MC = [];}; _IC = itemCargo _x; if (isnil "_IC") then {_IC = [];}; _BC = backpackCargo _x;if (isnil "_BC") then {_BC = [];}; _ObjectArray = [_WC,_MC,_IC,_BC]; _CompleteArray pushback _ObjectArray; { systemchat format ["%1",_x]; _BackPack = (_x select 1); _WC = weaponCargo _BackPack; if (isnil "_WC") then {_WC = [];}; _MC = magazineCargo _BackPack; if (isnil "_MC") then {_MC = [];}; _IC = itemCargo _BackPack; if (isnil "_IC") then {_IC = [];}; if !(_WC isEqualTo []) then { { _Box addWeaponCargoGlobal [_x,1]; } foreach _WC; }; if !(_MC isEqualTo []) then { { _Box addMagazineCargoGlobal [_x,1]; } foreach _MC; }; if !(_IC isEqualTo []) then { { _Box addItemCargoGlobal [_x,1]; } foreach _IC; }; } foreach (everyContainer _x); }; }; clearWeaponCargoGlobal _x; clearMagazineCargoGlobal _x; clearBackpackCargoGlobal _x; clearItemCargoGlobal _x; } foreach _VehiclesArray; { _DisArray = _x; _WC = _DisArray select 0; _MC = _DisArray select 1; _IC = _DisArray select 2; _BC = _DisArray select 3; if !(_WC isEqualTo []) then { { _Box addWeaponCargoGlobal [_x,1]; } foreach _WC; }; if !(_MC isEqualTo []) then { { _Box addMagazineCargoGlobal [_x,1]; } foreach _MC; }; if !(_IC isEqualTo []) then { { _Box addItemCargoGlobal [_x,1]; } foreach _IC; }; if !(_BC isEqualTo []) then { { _Box addBackpackCargoGlobal [_x,1]; } foreach _BC; { _Backpack = (_x select 1); clearMagazineCargoGlobal _BackPack; clearWeaponCargoGlobal _BackPack; clearItemCargoGlobal _BackPack; } foreach (everyContainer _Box); }; } foreach _CompleteArray; 1 Share this post Link to post Share on other sites