JacobJ 10 Posted October 5, 2010 Hello all I have written a script after reading around on the net and somehow it doesnt work. Here it is: if (((getPosATL heli1) select 2) > 200) then { deTach mhq1_ammobox; mhq1_ammobox setPos [(getPos mhq1_ammobox select 0),(getPos mhq1_ammobox select 1),-1]; _parachute = "ParachuteMediumWest" createVehicle position mhq1_ammobox; _parachute setPos (getPos mhq1_ammobox); mhq1_ammobox attachTo [_parachute,[0,0,-1.5]]; hint "Supply dropped!"; waituntil {(getPos mhq1_ammobox select 2) < 2}; deTach mhq1_ammobox; mhq1_ammobox setPos [(getPos mhq1_ammobox select 0),(getPos mhq1_ammobox select 1),0.001]; hint "Supply landed!"; heli1 removeAction dropbox1; heli1 removeAction heli1unload; _addactionW = execVM "addActionW.sqf"; waitUntil {scriptDone _addactionW}; } else { // If the engine was running, warn the user. hint "You have to be above 200 meters to drop"; }; }; When I activate it, it drops the ammobox and the parachute folds out and suddently disapear and the box is landed. It takes around 2 secs and it never gets to hang in the air. Ive tried to rise to 600 meters, but doesnt make a difference, it lands within a blink of an eye. I have tried to change the -1 in the setPos of the ammobox to 400 and deactivate the height limit of 200 meters. As soon as I push drop ammobox it drops the ammoboxs at 400 meters and it glides very nicely down. But why does it not work when I am in the air? Ive tried to change it to 2 meters and then drop it from 400 meters. The same happens like in the first situation, it lands within a blink of an eye. What have I done wrong? /Jacob Share this post Link to post Share on other sites
f2k sel 145 Posted October 5, 2010 I'm not sure where your ammo box is, if it's slung under the chopper then you don't need to setpos it. Maybe this will work. if (((getPosATL heli1) select 2) > 200) then { deTach mhq1_ammobox; //mhq1_ammobox setPos [(getPos mhq1_ammobox select 0),(getPos mhq1_ammobox select 1),-1]; _parachute = "ParachuteMediumWest" createVehicle position mhq1_ammobox; _parachute setPos [(getPos mhq1_ammobox select 0),(getPos mhq1_ammobox select 1),(getpos mhq1_ammobox select 2)]; mhq1_ammobox attachTo [_parachute,[0,0,-1.5]]; hint "Supply dropped!"; waituntil {(getPos mhq1_ammobox select 2) < 2}; deTach mhq1_ammobox; mhq1_ammobox setPos [(getPos mhq1_ammobox select 0),(getPos mhq1_ammobox select 1),0.001]; hint "Supply landed!"; heli1 removeAction dropbox1; heli1 removeAction heli1unload; _addactionW = execVM "addActionW.sqf"; waitUntil {scriptDone _addactionW}; } else { // If the engine was running, warn the user. hint "You have to be above 200 meters to drop"; }; //}; Share this post Link to post Share on other sites
JacobJ 10 Posted October 15, 2010 Worked very nicely, Thx for the answer F2k Sel! Share this post Link to post Share on other sites