wizbomb 10 Posted August 8, 2009 some one started a fourm a while back about using c130s to drop ammo and cars. he gave us a code but didnt really tell us step by step instructions so i posted but its so old that no one is responding so i started another....what is the codes and steps to make a c130 drop vehicles and ammo? think you:bounce3: Share this post Link to post Share on other sites
L_rch 10 Posted August 8, 2009 Couple of threads on it http://forums.bistudio.com/showthread.php?t=77397 http://forums.bistudio.com/showthread.php?t=81462 http://www.mediafire.com/?wddemkzrzd5 ..that is just a quick test I did based on some of the scripts from those threads. I have made it so I can call in an ammo drop and it drops on the players position. I also changed the guns contained in the dropped ammo box. Should give you an idea of what to do... Share this post Link to post Share on other sites
R34P3R 11 Posted August 8, 2009 Check the BIS Functions ! Share this post Link to post Share on other sites
wizbomb 10 Posted August 8, 2009 im new to scripting all i know is how to copy and past code into the initiative so this is all very confusing. i have seen all those other threads and i dont know what it means plz give me step by step instructions Share this post Link to post Share on other sites
kylania 568 Posted August 8, 2009 Do you need this for multiplayer or single player? I'm still working on getting my C130 drop working properly in multiplayer but it's good for single. Share this post Link to post Share on other sites
wizbomb 10 Posted August 8, 2009 single player just plz give me step by step (: ---------- Post added at 04:19 PM ---------- Previous post was at 04:18 PM ---------- ive seen half the code and i know you can change the drop like ammoboxes to tanks Share this post Link to post Share on other sites
kylania 568 Posted August 8, 2009 (edited) This is an eariler version of my idea. Step 1: Place the Functions module on the map. Step 2: Place a starting EMPTY marker (named "SD_in" for example) on the map where you want the planes to spawn from. Step 3: Place an ending EMPTY marker (named "SD_out" for example) on the map where you want the planes to disappear from. Step 4: Place a Radio Trigger which runs SD_Airdrop.sqf script. Make it's On Act the following: null = ["SD_in","SD_out",["HMMWV","reammobox"]] execVM "SD_Airdrop.sqf"; Change the "HMMWV" and "reammobox" to whatever you wanted to drop. Be aware that Goats will plant themselves into the ground on impact and get very angry, so try not to drop them. Step 4: Save the following script to SD_Airdrop.sqf [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; [color="SeaGreen"]// ingress marker name[/color] _out = _this select 1; [color="SeaGreen"]// egress marker name[/color] _items = _this select 2; [color="SeaGreen"]// Item array[/color] SD_item1 = _items select 0; [color="SeaGreen"]// First item[/color] SD_item2 = _items select 1;[color="SeaGreen"] // Second item[/color] [color="SeaGreen"]// Config[/color] _mapMarkText = "Click on the map to mark the drop point."; _closeMapMessage = "Close the map to initiate drop procedure"; _droppoint = "SD_DropMarker"; _dropMarkerType = "SupplyVehicle"; _incomingMessage = "This is fat man actual, we are inbound with supply drop, please stand by..."; _triggerDistance = 300; [color="SeaGreen"]// Map click to determine where the supplies will be dropped.[/color] SD_dropmarked = true; hint _mapMarkText; _mapString = format["SD_DropMarker = createMarker [""%1"", _pos]; ""%1"" setMarkerType ""%2"";;SD_dropmarked=false",_droppoint, _dropMarkerType]; onMapSingleClick _mapString; waitUntil{!SD_dropmarked}; onMapSingleClick ""; [color="SeaGreen"]// Wait till they close the map to continue.[/color] hint _closeMapMessage; waitUntil{!visibleMap}; hintSilent ""; [color="SeaGreen"]// Have the player turn and toss smoke to mark the spot.[/color] _spot = getMarkerPos _droppoint; _myspot = getPos player; _set_dir = ((_spot select 0) - (_myspot select 0))atan2((_spot select 1) - (_myspot select 1)); player setDir _set_dir; player setPos getPos player; player playAction "ThrowGrenade"; sleep 2; SD_smokePot = "Fuel_can" createVehicle (getMarkerPos _droppoint); [sD_smokePot, [0.4,0.8,0.4]] spawn { _sh=_this select 0; _col=_this select 1; _c1=_col select 0; _c2=_col select 1; _c3=_col select 2; sleep (3+random 1); _source = "#particlesource" createVehicleLocal getpos _sh; _source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh]; _source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10]; _source setDropInterval 0.03; _source2 = "#particlesource" createVehicleLocal getpos _sh; _source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh]; _source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360]; _source2 setDropInterval 0.03; }; [color="SeaGreen"] // Create the group and spawn 2 C130s named SD_c1 and SD_c2[/color] SD_dg = creategroup west; _dp = [[(getMarkerPos _in) select 0, (getMarkerPos _in) select 1, 50], 270, "C130J", SD_dg] call BIS_fnc_spawnVehicle; sleep 2; _dp2 = [[(getMarkerPos _in) select 0, (getMarkerPos _in) select 1, 50], 270, "C130J", SD_dg] call BIS_fnc_spawnVehicle; SD_c1 = _dp select 0; SD_c2 = _dp2 select 0; SD_planelist = [sD_c1,SD_c2]; [color="SeaGreen"]// Make them fly pretty.[/color] SD_dg setFormation "COLUMN"; SD_c1 flyinHeight 200; SD_c2 flyinHeight 200; [color="SeaGreen"]// Set the first waypoint to where the marker was placed, second to the egress point.[/color] _wp = SD_dg addWaypoint [getMarkerpos _droppoint, 1]; _wp1 = SD_dg addWaypoint [getMarkerPos _out, 2]; [color="SeaGreen"]// Delete the crew and planes once they hit the egress point.[/color] [sD_dg, 2] setWaypointStatements ["true", "{{deleteVehicle _x} forEach crew _x;} foreach units SD_dg; {deletevehicle _x} foreach SD_planelist;"]; [color="SeaGreen"]// Spawn code for organized drop. First plane hits the marker and drops the first item and three seconds later the trailing plane drops it's cargo. // This is to prevent a turn towards egress from failing to bring the second plane close enough to the trigger to activate.[/color] SD_dropCode = {[sD_c1,SD_item1] call BIS_fnc_supplyDrop; sleep 3; [sD_c2,SD_item2] call BIS_fnc_supplyDrop; deleteVehicle SD_smokePot;}; [color="SeaGreen"]// Set up the trigger for the first plane at the location of the drop marker.[/color] _dt = createTrigger ["EmptyDetector", [0,0,0]]; _dt setTriggerArea [0, 0, 0, true]; _dt setTriggerActivation ["NONE", "PRESENT", false]; _triggerStatements = format["SD_c1 distance (getMarkerPos ""%1"") <= %2;",_droppoint,_triggerDistance]; _dt setTriggerStatements [_triggerStatements, "[] spawn SD_dropCode;", ""]; [color="SeaGreen"]// Alert player that the supply drop is incoming.[/color] sleep 5; (driver SD_c1) sideChat _incomingMessage; Note that this does not properly work in multiplayer, and currently doesn't properly work should one of them get shot down. I have a slightly more advanced version which is run via class-limited AddAction (Team Leaders only for example) and checks if air cover has been eliminated yet, but it's still MP broken. :( How do you broadcast things like particle effects and chat across all clients? Edited August 8, 2009 by kylania Player direction and trigger height Share this post Link to post Share on other sites
wizbomb 10 Posted August 8, 2009 (edited) one question do i create a map then put these codes in it? i told you i was new (: ---------- Post added at 05:08 PM ---------- Previous post was at 05:03 PM ---------- and where do i start copy? where it says null = ["ingressMarkerName","egressMarkerName",["HMMWV","reammobox"]] execVM "SD_Airdrop.sqf";? ---------- Post added at 05:33 PM ---------- Previous post was at 05:08 PM ---------- Godamn windows vista wont let me save anything!!!!!!!!! ---------- Post added at 05:34 PM ---------- Previous post was at 05:33 PM ---------- i dont know what you mean by Save the following script to SD_Airdrop.sqf Edited August 8, 2009 by wizbomb Share this post Link to post Share on other sites
{G&L}ACF{SCOTDG} 10 Posted August 8, 2009 open notepad and copy the script he gave you,then save as SD_Airdrop.sqf and pop it in ure mission folder:) Share this post Link to post Share on other sites
wizbomb 10 Posted August 8, 2009 lol i did that but it says its not there lol is there something im doing wrong? i pull up alpha and hit it then it says file not found and i made sure it was a sqf file Share this post Link to post Share on other sites
{G&L}ACF{SCOTDG} 10 Posted August 8, 2009 are you sure u put in the mission folder? the one in thats in ure MY Documents arma 2 folder ,then in the mission that you want this script to happen in ?:) Share this post Link to post Share on other sites
wizbomb 10 Posted August 8, 2009 ok i got it to work great but THEY DID NOT DROP ANYTHING!!!!!!!!!!!!!!!! ---------- Post added at 06:51 PM ---------- Previous post was at 06:21 PM ---------- plz help me???? Share this post Link to post Share on other sites
kylania 568 Posted August 8, 2009 Sorry about that wizbomb, I forgot I'd been playing with flyinheights and had them flying higher than the trigger distance! :) Copy the code again and the trigger should work, as well as the player turning to face where they were throwing the smoke. Share this post Link to post Share on other sites
wizbomb 10 Posted August 8, 2009 lol ok ---------- Post added at 07:33 PM ---------- Previous post was at 07:02 PM ---------- hey it works! but i was wondering is there a way that i can have the other one drop the supplies closer to the lz???and is there a way i can have only one c130????? THINK YOU SO MUCH Share this post Link to post Share on other sites
{G&L}ACF{SCOTDG} 10 Posted August 9, 2009 oh i forgot to mention about it not not working as well lol waitin in ma humvee in the desert for 10 listin to the radio though lol :p Share this post Link to post Share on other sites
jakerod 254 Posted August 9, 2009 Here's my way. It is slightly less complex. Granted the only things you can get from it are a humvee or an ammobox. Put in a C-130. Type in its init field: this flyinheight 200 Put in a trigger. Group the trigger to the C-130 Make it says "Vehicle" and Present. Put in its activation line: [c1,"Reammobox"] call BIS_fnc_supplyDrop; Make the trigger as big as you need it. Give the C-130 a waypoint to go through the trigger. Now when the C-130 flies into the trigger area it will drop an ammobox. Change "Reammobox" to "land" to change it to a humvee. Share this post Link to post Share on other sites
Cellus 10 Posted August 9, 2009 Here's my way. It is slightly less complex. Granted the only things you can get from it are a humvee or an ammobox. You can drop anything at all from that, just by changing what's between the quotes. As was said in all the other supply drop threads. Share this post Link to post Share on other sites
jakerod 254 Posted August 9, 2009 You can drop anything at all from that, just by changing what's between the quotes. As was said in all the other supply drop threads. Oh really? I was told it was one of the two things only. Okay thanks I will look into that. Share this post Link to post Share on other sites
Cellus 10 Posted August 9, 2009 http://www.armatechsquad.com/ArmA2Class/ Use the file names there. Share this post Link to post Share on other sites
wizbomb 10 Posted August 9, 2009 KYLANIA can you plz change the script so only one plane comes (the second one i dont need) cuz i dont know how to (; ---------- Post added at 12:45 PM ---------- Previous post was at 12:26 PM ---------- NVM i got my problem fixed. i went into the file and put a one second delay on the drop so it dont land a mile away (;.....................can you drop solders? Share this post Link to post Share on other sites
kylania 568 Posted August 9, 2009 For what it's worth, here's a one plane version. Glad you got the drop working how you'd like. The timing can be tricky depending on terrain and wind and what you're dropping. ////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: 1ID-CPL. Venori ////////////////////////////////////////////////////////////////// // Preplace Functions module, "egress" and "ingress" markers on the map. /* Single plane version. null = ["ingressMarkerName","egressMarkerName","HMMWV"] execVM "SD_Airdrop.sqf"; */ // Input _in = _this select 0; // ingress marker name _out = _this select 1; // egress marker name SD_item1 = _this select 2; // item // Config _mapMarkText = "Click on the map to mark the drop point."; _closeMapMessage = "Close the map to initiate drop procedure"; _droppoint = "SD_DropMarker"; _dropMarkerType = "SupplyVehicle"; _incomingMessage = "This is fat man actual inbound with supply drop, please stand by..."; _triggerDistance = 300; // Map click to determine where the supplies will be dropped. SD_dropmarked = true; hint _mapMarkText; _mapString = format["SD_DropMarker = createMarker [""%1"", _pos]; ""%1"" setMarkerType ""%2"";;SD_dropmarked=false",_droppoint, _dropMarkerType]; onMapSingleClick _mapString; waitUntil{!SD_dropmarked}; onMapSingleClick ""; // Wait till they close the map to continue. hint _closeMapMessage; waitUntil{!visibleMap}; hintSilent ""; // Have the player turn and toss smoke to mark the spot. _spot = getMarkerPos _droppoint; _myspot = getPos player; _set_dir = ((_spot select 0) - (_myspot select 0))atan2((_spot select 1) - (_myspot select 1)); player setDir _set_dir; player setPos getPos player; player playAction "ThrowGrenade"; sleep 2; SD_smokePot = "Fuel_can" createVehicle (getMarkerPos _droppoint); [sD_smokePot, [0.4,0.8,0.4]] spawn { _sh=_this select 0; _col=_this select 1; _c1=_col select 0; _c2=_col select 1; _c3=_col select 2; sleep (3+random 1); _source = "#particlesource" createVehicleLocal getpos _sh; _source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh]; _source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10]; _source setDropInterval 0.03; _source2 = "#particlesource" createVehicleLocal getpos _sh; _source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh]; _source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360]; _source2 setDropInterval 0.03; }; // Create the group and spawn a C130 named SD_c1 SD_dg = creategroup west; _dp = [[(getMarkerPos _in) select 0, (getMarkerPos _in) select 1, 50], 270, "C130J", SD_dg] call BIS_fnc_spawnVehicle; SD_c1 = _dp select 0; // Make it fly low. SD_c1 flyinHeight 200; // Set the first waypoint to where the marker was placed, second to the egress point. _wp = SD_dg addWaypoint [getMarkerpos _droppoint, 1]; _wp1 = SD_dg addWaypoint [getMarkerPos _out, 2]; // Delete the crew and plane once it hits the egress point. [sD_dg, 2] setWaypointStatements ["true", "{deleteVehicle _x} forEach crew SD_c1;} deletevehicle SD_c1;"]; // Spawn code for organized drop. First plane hits the marker and drops the item SD_dropCode = {[sD_c1,SD_item1] call BIS_fnc_supplyDrop; deleteVehicle SD_smokePot;}; // Set up the trigger for the plane at the location of the drop marker. _dt = createTrigger ["EmptyDetector", [0,0,0]]; _dt setTriggerArea [0, 0, 0, true]; _dt setTriggerActivation ["NONE", "PRESENT", false]; _triggerStatements = format["SD_c1 distance (getMarkerPos ""%1"") <= %2;",_droppoint,_triggerDistance]; _dt setTriggerStatements [_triggerStatements, "[] spawn SD_dropCode;", ""]; // Alert player that the supply drop is incoming. sleep 5; (driver SD_c1) sideChat _incomingMessage; Share this post Link to post Share on other sites
wizbomb 10 Posted August 10, 2009 (edited) lol i know ---------- Post added at 09:21 PM ---------- Previous post was at 09:14 PM ---------- im doing a free roam thing where ambiant combat is on (any pointers?) and im using your c130 to give me a vehicle if i lose one (: ---------- Post added at 09:32 PM ---------- Previous post was at 09:21 PM ---------- lol im sorry i keep bugging you but can you drop multiple objects from one plane? Edited August 10, 2009 by wizbomb Share this post Link to post Share on other sites
wizbomb 10 Posted August 10, 2009 is it possable??? Share this post Link to post Share on other sites
kylania 568 Posted August 10, 2009 Should be possible. That was my original idea, however after speaking with a friend of mine who's in the military he said that C-130 drops usually are 1 package per plane, planes in pairs, usually 2 pair. I was unable to get the flight to work properly gamewise though. Usually the first plane is lower than the trailing plane that is at the first plane's 4 o'clock. When I made them fly like this the drop spread was HUGE. Share this post Link to post Share on other sites
wizbomb 10 Posted August 11, 2009 i know but it would be cool if you could drop 1 m1a2, 1 lav-25 and a humma! ---------- Post added at 08:41 PM ---------- Previous post was at 08:39 PM ---------- oh by the way if i put ['M1A2_TUSK_MG,M1A2_TUSK_MG'] it wont drop two, infact it wont drop anything lol :( Share this post Link to post Share on other sites