Jump to content
kibaBG

[HELP] Paradrop crate at waypoint

Recommended Posts

I am trying to create a custom crate paradrop at heli transport waypoint. Crate is made with parachute, but the problem is it just stays at the altitude the crate is detached from the vehicle. 

_wp1 = transportGRP addWaypoint [(position (leader ghost)), 30];
_wp1 setWaypointType "MOVE";
[transportGRP, 1] setWaypointBehaviour "CARELESS";
[transportGRP, 1] setWaypointStatements ["true", "
_acrate = 'Land_WoodenCrate_01_F' createVehicle [5123.63,4869.14,0];
_acrate addMagazineCargoGlobal ['rhs_30Rnd_545x39_AK_plum_green', 10];
_acrate addMagazineCargoGlobal ['rhssaf_mag_brd_m83_green', 2];
_acrate addMagazineCargoGlobal ['rhs_mag_rgd5', 10];
_acrate addMagazineCargoGlobal ['rhs_30Rnd_762x39mm_polymer_tracer', 10];
_acrate addMagazineCargoGlobal ['rhs_45Rnd_545X39_AK_Green', 20];
_acrate addMagazineCargoGlobal ['rhs_VOG25', 10];
_acrate addMagazineCargoGlobal ['rhs_10Rnd_762x54mmR_7N14', 10];
_acrate addMagazineCargoGlobal ['ACE_10Rnd_762x54_Tracer_mag', 10];
_acrate addMagazineCargoGlobal ['rhs_20rnd_9x39mm_SP6', 10];
_acrate addMagazineCargoGlobal ['rhs_5Rnd_338lapua_t5000', 10];
_acrate addBackpackCargoGlobal ['B_Kitbag_rgr', 3];
_acrate addItemCargoGlobal ['ACE_salineIV_500', 10];
_acrate addItemCargoGlobal ['ACE_personalAidKit', 2];
_acrate attachTo [(objectParent (leader transportGRP)),[0,0,-1]];
detach _acrate;
_chute = 'B_Parachute_02_F' createVehicle position _acrate;
_chute attachTo [_acrate, [0,0,1]];
"];

How to make so the crate falls down to ground? 

Share this post


Link to post
Share on other sites

Have no time to test yr script now so I pasted my similar one, maybe it will give you some idea.

 

//ДОПУНА КАРАУЛА ИСТОК

systemChat "Припрема испуштања допунског материјала..."; sleep 30;

private _source = playSound "helicopter";
_source spawn
{
    waitUntil { isNull _this };    
}; sleep 20;

//PADOBRAN
supp = createVehicle ["O_Parachute_02_F", [0,0,500]], [], 0, "FLY";
supp setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +500];

systemChat "Пакет испуштен";

//KUTIJA
supk = "O_supplyCrate_F" createVehicle [0,0,50];
supk attachTo [supp, [0, 0, -1.3]];
//OPREMA
clearWeaponCargo supk;
clearMagazineCargo supk;
clearItemCargo supk;
clearBackpackCargo supk;

supk addMagazineCargo ["5Rnd_127x108_APDS_Mag",4];
supk addMagazineCargo ["rhs_10Rnd_762x39mm_tracer",2];
supk addItemCargo ["rvg_rustyCan", 1];
supk addItemCargo ["rvg_money", 1];
supk addItemCargo ["rvg_plasticBottle", 1];
supk addItemCargo ["ACE_bloodIV_250", 2];
supk addItemCargo ["ACE_fieldDressing", 4];
supk addItemCargo ["ACE_splint", 1]; sleep 80;

//DIM
_signal = "SmokeShellYellow" createVehicle position supk; 
_signal attachTo [supk, [0, 0, 0.4]]; sleep 70;

_signal = "SmokeShellGreen" createVehicle position supk; 
_signal attachTo [supk, [0, 0, 0.4]];

 

I used two smokes because the time of crate is in the air is too long sometimes as the wind is strong, so the first smoke is gone before it touches the ground and in the night it is hard to find it without a smoke signal, especially in rough terrains.

Share this post


Link to post
Share on other sites

Module ingame called supply drop. Also, u can script it similarly to creating a crate in the upper post and set a waypoint after attaching the crate to the flying vehicle (especially now in 2.14 version where flyInHeight forced is working as it should.)

 

excmpl video https://www.youtube.com/watch?v=8_gt6jM4dTk

also some useful writing: https://forums.bohemia.net/forums/topic/190896-supply-drop/

 

Share this post


Link to post
Share on other sites

@Nemanjic The crate detached fine, the parachute opens fine, they are attached together but they just stay in air like the simulation is disabled. 
 

Share this post


Link to post
Share on other sites

Hmm wierd. Need to test it but I can't right now. Try to set the simulation to true of both crate and chute but separately first. That's all I can think of right now in raw thoughts without testing..

After this line: _chute = 'B_Parachute_02_F' createVehicle position _acrate;

_chute enableSimulation true;   or _chute setMass 2000;

Share this post


Link to post
Share on other sites

I tried with 
 

_chute enableCollisionWith _acrate;

but no success ...

Share this post


Link to post
Share on other sites

What is the transportGRP referring to? Pilot's group?

Share this post


Link to post
Share on other sites

Yes. I think when the parachute is attached to the crates it disables the simulation of the parachute and they just stay in the air not falling down. I think there should be a downward speed/vector applied ...

Share this post


Link to post
Share on other sites

The same thing happens with a guy from my team who is testing right now. 

test

 

edited:

My script still works fine, try to implement it inside your _wp statement just change the type of cargo in crate and spawn pos

 

 

Share this post


Link to post
Share on other sites

You are attaching the parachute to the crate. Attach the crate to the parachute, as seen in Nemanjic's code.

  • Like 1

Share this post


Link to post
Share on other sites

Yea something like this. Not tested yet:

_wp1 = transportGRP addWaypoint [(position (leader ghost)), 30];
_wp1 setWaypointType "MOVE";
[transportGRP, 1] setWaypointBehaviour "CARELESS";
[transportGRP, 1] setWaypointStatements ["true", "
_acrate = 'Land_WoodenCrate_01_F' createVehicle [5123.63,4869.14,0];
_acrate addMagazineCargoGlobal ['rhs_30Rnd_545x39_AK_plum_green', 10];
_acrate addMagazineCargoGlobal ['rhssaf_mag_brd_m83_green', 2];
_acrate addMagazineCargoGlobal ['rhs_mag_rgd5', 10];
_acrate addMagazineCargoGlobal ['rhs_30Rnd_762x39mm_polymer_tracer', 10];
_acrate addMagazineCargoGlobal ['rhs_45Rnd_545X39_AK_Green', 20];
_acrate addMagazineCargoGlobal ['rhs_VOG25', 10];
_acrate addMagazineCargoGlobal ['rhs_10Rnd_762x54mmR_7N14', 10];
_acrate addMagazineCargoGlobal ['ACE_10Rnd_762x54_Tracer_mag', 10];
_acrate addMagazineCargoGlobal ['rhs_20rnd_9x39mm_SP6', 10];
_acrate addMagazineCargoGlobal ['rhs_5Rnd_338lapua_t5000', 10];
_acrate addBackpackCargoGlobal ['B_Kitbag_rgr', 3];
_acrate addItemCargoGlobal ['ACE_salineIV_500', 10];
_acrate addItemCargoGlobal ['ACE_personalAidKit', 2];

_chute = 'B_Parachute_02_F' createVehicle position _acrate;
_acrate attachTo [_chute, [0,0,-2]];

"];

  • Like 1

Share this post


Link to post
Share on other sites

@Nemanjic The problem is I have to attach and detach crate from heli first to get the exact position ...

Share this post


Link to post
Share on other sites

Why? Heli arrives at wp (completed) and does the operation with the crate and chute above the ghost leader...

Share this post


Link to post
Share on other sites

Because 

_acrate = 'Land_WoodenCrate_01_F' createVehicle [5123.63,4869.14,0];

Its created elsewhere and then is attached to heli. I want it to start falling from the heli not just above the player.  

Share this post


Link to post
Share on other sites

*EDITS*

Spawn the crate, move it near your heli. Let it fall for a couple of seconds, then spawn parachute, move it to just above your crate, attach.

nul = [] spawn {  
 _acrate = 'Land_WoodenCrate_01_F' createVehicle [0,0,0]; 
 _acrate setPos (getPosATL heli1 vectorAdd [0,-5,0]);  
 sleep 3;  
 _chute = createVehicle ["O_Parachute_02_F", [0,0,500], [], 0, "FLY"];  
 _chute setPosATL (getPosATL _acrate vectorAdd [0,0,1]);  
 _acrate attachTo [_chute, [0,0,-0.2]];  
};

This works nicely with the Huron - the crate falls out of the ramp, free falls for 3 seconds then the chute opens. If your heli is moving, you could reduce the sleep.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I tried to use it on first waypoint, but nothing spawns ...
 

_wp1 = transportGRPus addWaypoint [(position (leader alpha)), 0];
_wp1 setWaypointType "MOVE";
[transportGRPus, 1] setWaypointBehaviour "CARELESS";
[transportGRPru, 1] setWaypointStatements ["true", "
nul = [] spawn {  
_acrate = 'Land_WoodenCrate_01_F' createVehicle [0,0,0]; 
_acrate setPos (getPosATL heli1 vectorAdd [0,-5,0]);  
sleep 3;  
_chute = createVehicle ['O_Parachute_02_F', [0,0,500], [], 0, 'FLY'];  
_chute setPosATL (getPosATL _acrate vectorAdd [0,0,1]);  
_acrate attachTo [_chute, [0,0,-0.2]];  
};
"];

 

Share this post


Link to post
Share on other sites

I referenced my helicopter with the variable name "heli1." You need to either name your helicopter and use the variable name you choose, or use the dynamic reference from your original code:

(objectParent (leader transportGRP))

That said, my code is not great, and in fact is probably not usable. I'm going back to the drawing board.

Share this post


Link to post
Share on other sites

Obviously I am blind because I didn't see you named the helicopter ...:face_palm:

I tested it again and everything worked fine (and looks fine too), thank you!  
If anyone uses the script make sure the helicopter speed is around 100 km/h or less, otherwise the crate can go under the ground.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×