Jump to content
Sign in to follow this  
frattonstation

Vehicle drop from C130

Recommended Posts

I deleted the while loop and just added:

sleep 120;
deleteVehicle _chute1;
base_crate setVelocity [0, -10, 0];

This deletes the chute if it's stuck on a tree but the cargo container is not affected by the velocity? It just stays mid air.

Any solutions to that?

Share this post


Link to post
Share on other sites
Yeah, this is an older version of it actually. I've got it working much better now, and it deletes the marker.

Only problem I'm having so far is what to do if one/both planes are destroyed inbound and making it multiplayer friendly.

Great script Kyle. Would you mind posting your new, updated script? Also, which parameter is the color of the smoke?

Edited by Rekrul

Share this post


Link to post
Share on other sites

I dont understand at all ._.' ! Could someone "maybe" write a script to make a vehicle drop from a C130 when a trigger is triggered. I dont understand how to do the changes in your fixed scripts now. and well i ask for some help ^^ Private message or w/e :) thanks in advance

Share this post


Link to post
Share on other sites
This is a rewrite of some code from another thread.

Basically I rewrote the script to use more BIS functions and map click to select the drop zone.

Just preplace the "ingress" marker where you want them to spawn and the "egress" marker where you want them to delete.

[color=SeaGreen]//////////////////////////////////////////////////////////////////

// Function file for Armed Assault

// Created by: 1ID-CPL. Venori

//////////////////////////////////////////////////////////////////

// Preplace Functions module, "egress" and "ingress" markers on the map.

/*

null = ["ingressMarkerName","egressMarkerName",["HMMWV","reammobox"]] execVM "SD_Airdrop.sqf";

*/[/color]

[color=SeaGreen]// Input[/color]

_in = _this select 0; // ingress marker name

_out = _this select 1; // egress marker name

_items = _this select 2; // Item array.............................

What if I want a scroll down selection to say Supply Drop? and that is what initiates the map click, then supply drop?

so you scroll down, select "Supply Drop", then it says "mark map" (or something similar), then the c130 drops your gear...?

Share this post


Link to post
Share on other sites

i have added player AddAction ["Supply Drop", SD_Airdrop.sqf"]; and nothing happens. have the functions module in game...? nothing....?

Maybe you just did it wrong here but.

player AddAction ["Supply Drop", "SD_Airdrop.sqf"];

Share this post


Link to post
Share on other sites
Great script Kyle. Would you mind posting your new, updated script? Also, which parameter is the color of the smoke?

i am intressted too

Share this post


Link to post
Share on other sites

My re-write version:

I fixed the bad behaviour of the plane and added 1 greensmoke when the cargo reach the ground and 1 flare for night time

(the original had 1 greensmoke)

-Place a trigger to activate this script in your editor

-In "condition"

(vehicle player) in thislist;

-In "On act"

_nul=[getPos drop1,"UNBasicWeapons_EP1",getDir drop1] execVM "scripts\dropspawn.sqf";

-Place a "H"invisible called "drop1", it will be the place where the ac will drop the cargo, rotate the "H" to adjust the direction of the plane

dropspawn.sqf

_pos = _this select 0;
_spawntype = _this select 1;
_dir = _this select 2;
_airtype = "An2_TK_EP1";
//_airtype = "C130J";
//_airtype = "UH60M_EP1";
_type = "GUE_Soldier_Pilot";
mygroup = creategroup side player;

//_______________________________________________


_target = createVehicle  ["testsphere2",[_pos select 0,_pos select 1,-10], [], 0, "FLY"];
_target setpos [_pos select 0,_pos select 1,200];
_target setDir _dir;
_vdir = vectorDir _target;
//26
_target setpos [(_pos select 0) + (_vdir select 0) * 30, (_pos select 1) + (_vdir select 1) * 30,200];
_apos = getposasl _target;

//alt 300
_npos = [(_pos select 0) + (_vdir select 0) * -1600, (_pos select 1) + (_vdir select 1) * -1600, 200];

_vehicle = createVehicle  [_airtype,_npos, [], 0, "FLY"];
_vehicle setpos _npos;
_vehicle setDir _dir;
_vehicle setvelocity [(_vdir select 0)*50,(_vdir select 1)*50, 5];

//_______________________________________________

_type createUnit [_npos, mygroup,"pilot=this;"];
_pilot = pilot;
_pilot moveindriver _vehicle;
_pilot reveal _target;
_pilot setBehaviour "COMBAT";
_vehicle setBehaviour "COMBAT";
_vehicle setCombatMode "RED";
_pilot forceSpeed 200;
_vehicle forceSpeed 200;

//_______________________________________________


while {_vehicle distance _pos > 200} do {
   _pilot FlyInHeight 195;
_vehicle FlyInHeight 195;
_pilot doMove _pos;
_vehicle doMove _pos;
};

//_______________________________________________


   _bpos = _vehicle ModelToWorld [0,-12,-5.5];

   _bomb = _spawntype createVehicle _bpos;
   _bomb setpos _bpos;
   _bomb setDir direction _vehicle;

   _chute = "ParachuteMediumWest" createVehicle getpos _bomb;
   _chute setpos (_bomb ModelToWorld [0,0,3]);

   _bomb attachTo [_chute,[0,0,0]];

//Add SmokeShellgreen to _chute
   _smoke = "SmokeShellgreen" createVehicle getpos _bomb;
   _smoke setpos (_bomb ModelToWorld [0,0,4]);
   _smoke attachTo [_chute,[0,0,1]];

//Add Flare for night time to _chute
   if(daytime < 7 || daytime > 18) then {
   _flare = "F_40mm_White" createVehicle [getPos _chute select 0,getPos _chute select 1,+150];
   _flare attachTo [_chute,[0,0,-4]];
};

sleep 0.5;


//CODE FROM SBROS
//Waiting of a landing of a ammo box
waitUntil {((getPos _bomb) select 2) < 1};
//Unhitching of a box from a parachute	
detach _bomb;
//Lifting the ammo box on the ground level	
_bomb setpos [(getpos _bomb select 0), (getpos _bomb select 1), 0];
//Create new ammo box
_bam = "UNBasicWeapons_EP1" createVehicle [(getpos _bomb select 0),(getpos _bomb select 1),(getpos _bomb select 2)+0];
//Delete old ammo box	
deletevehicle _bomb;

//Add SmokeShellgreen to _bam
_smoke = "SmokeShellgreen" createVehicle getpos _bam;
_smoke attachTo [_bam,[0,0,0]];

sleep 1;

//FOR AMMOBOX_MODEL ONLY
clearweaponcargo _bam;
clearmagazinecargo _bam;

//test-------------------------------

_riffles = ["AKS_74_U","AK_74_GL","AK_74_GL"] call BIS_fnc_selectRandom;
_riffles2 = ["AK_74_GL_kobra","AKS_74_pso"] call BIS_fnc_selectRandom;
_rifflesmags = ["30Rnd_545x39_AK","30Rnd_545x39_AK"] call BIS_fnc_selectRandom;

//_equip = ["NVGoggles","Binocular_Vector"] call BIS_fnc_selectRandom;

_bam addWeaponCargo [_riffles,1];
_bam addWeaponCargo [_riffles2,1];
_bam addMagazineCargo [_rifflesmags,12];

//_bam addWeaponCargo [_equip,1];


//test-------------------------------

sleep 8;

_plane FlyInHeight 200;
_pilot doMove [(_pos select 0) + (_vdir select 0) * 800, (_pos select 1) + (_vdir select 1) * 800, 500];

sleep 120;

deletevehicle _target;
deletevehicle _vehicle;
deletevehicle _pilot;

Edited by Oliv82

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
Sign in to follow this  

×