Shadow_Spyder 0 Posted December 25, 2007 Ok, so what I am looking to do is when you load up a chopper or whatever airborne vehicle with ammo and weapons ect, you fly to a location where the ground troops are, and via addaction, you click "drop supplies" or whatever and all that ammo/weapons goes into an ammo box and falls to the ground via parachute. I think I can work out the addaction part, but as far as putting all that stuff into an ammo box and getting it attached to a parachute, I am completely lost. I tried searching these forums but didn't come up with any good results, a few of them looked promising but the links they offered were dead. Anyone who can provide me some tips or missions I can check out to see how things work i'd greatly appreciate it. Thx Share this post Link to post Share on other sites
Shadow_Spyder 0 Posted December 27, 2007 Been a couple few days.... still wanting to get this figured out. Anyone out there got any tips at all? Share this post Link to post Share on other sites
Asuriel 0 Posted December 27, 2007 you should be able to do this using the weaponpool. actually used to transfer weapons between missions. use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">pickweaponpool chopper to add the weapons in the chopper's cargo space to the weaponpool. Then spawn your ammobox with parachute and use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">putweaponpool ammobox to fill the weapons previously added to the weaponpool from the chop's cargo into the ammobox. you have to write a script that setpos the ammobox right underneath the empty parachute you spawn. should look something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _ammobox = _this select 0 _parachute = _this select 1 #loop ~0.1 _ammobox setpos [getpos _parachute select 0, getpos _parachute select 1, (getpos _parachute select 2) - #] ?(getpos _ammobox select 2 < 1):exit goto "loop" now "#" has to be replaced by some number which makes the entire setup look believable. good luck! Share this post Link to post Share on other sites
Shadow_Spyder 0 Posted December 28, 2007 Thank you very much for your help. Unfortunately I am a complete newb when it comes to scripting. Here is what I have done, and its not working lol. Created my chopper, named it Chopper. Created an ammobox, named it ammobox. Created a parachute, named it parachute. I tried adding the "pickweaponpool chopper" "putweaponpool ammobox" just like that (minus quoats) above the script you sent me and I have that all saved in the missions folder named Ammo_Drop.sqs. I have an addaction on the chopper that runs the Ammo_Drop.sqs. SO, in my eyes, looks like everything SHOULD be set-up. I start the mission, run up to the chopper, drop all my gear into it, then hit the addaction. For some reason the chopper drops into the ground and the ammobox doesnt go up to the parachute, and I checked the ammobox and it has no new weapons/ammo in it. Maybe you can spot what I am doing wrong because I am completely clueless.... Share this post Link to post Share on other sites
Shadow_Spyder 0 Posted December 29, 2007 Ok, the pickweaponpool command keeps crashing my arma, a CTD. Anyone got this to work properly with no crashes? Share this post Link to post Share on other sites
ArmaVidz 0 Posted December 29, 2007 I'm not sure about the proceedure on how to make a parachute, it was done a while back for something but I can't find it. Perhaps you could attach a parachute to a standard ammo/weapon crate? The following line is the createVehicle to create a US Weapon Crate. Use that for your addaction? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">veh = createVehicle ["WeaponBoxWest", position player, [], 0, "NONE"] To spawn ammo/weapon boxes near an object or unit change the 'position player' to the unit/object's name <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">veh = createVehicle ["WeaponBoxWest", Replace_Text_with_VEHICLENAME, [], 0, "NONE"] Â Share this post Link to post Share on other sites
Asuriel 0 Posted December 29, 2007 The thing with the ammo can't be done the way you'd like. Simply because you can't get what weapons are in a vehicles cargospace. You could put your weapons into a crate instead of into the chopper. then hide it somewhere on the map where the player doesn't come by and the call the parachute script. which will make it look like as if the ammobox was loaded and then dropped from the chopper. The parachute is simple. I already posted the script above. you have to call the script using <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[ammobox, parachute] exec "ammodrop.sqs" of course only when you save the script as "ammodrop.sqs". you still have to spawn the parachute using the createvehicle command. look in the wiki for more info. Share this post Link to post Share on other sites
Asuriel 0 Posted December 29, 2007 I'm not sure about the proceedure on how to make a parachute, it was done a while back for something but I can't find it. Perhaps you could attach a parachute to a standard ammo/weapon crate? The following line is the createVehicle to create a US Weapon Crate. Use that for your addaction?<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">veh = createVehicle ["WeaponBoxWest", position player, [], 0, "NONE"] To spawn ammo/weapon boxes near an object or unit change the 'position player' to the unit/object's name <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">veh = createVehicle ["WeaponBoxWest", Replace_Text_with_VEHICLENAME, [], 0, "NONE"] the command can be simpler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">varname = "cfgclass" createvehicle position look in the wiki under the createvehicle command. there you'll find a link to the cfgvehicles page. there you'll find the classname of the parachute you need. Share this post Link to post Share on other sites
Shadow_Spyder 0 Posted December 29, 2007 Well... a lot of people have told me it's not possible to get the weapons/ammo from the vehicles cargo space. If that absolutely can NOT be done, then no need for me to work on this anymore because that is the MAIN thing I was trying to achieve. Plenty of other people have already made ammo drops ect, no need to reinvent the wheel again. I wanted a pilot or a soldier to load up a chopper with ammo, and have the chopper drop it off via ammobox/parachute instead of having to land in a hot zone or making the ground troops run far as hell to get to a green zone where the chopper can land safely. Ohwell... maybe someday... or ArmA2 Share this post Link to post Share on other sites
jezpops 0 Posted January 3, 2008 Quote[/b] ]You could put your weapons into a crate instead of into the chopper. then hide it somewhere on the map where the player doesn't come by and the call the parachute script. which will make it look like as if the ammobox was loaded and then dropped from the chopper. You could do both of course, with every weapon you put in the chopper you also put in the ammo crate. Then when you call the ammodrop, you spawn the ammocrate where the parachute lands and empty the choppers weapon cargo. The support v1 script, the ammo drop script, you will also need the markersfriendly and markers enemy that are contained in the support v1 pack. This is just the parachuting part: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;Script By Michael --- www.zonekiller.ath.cx --- michael_moon@westnet.com.au .au ?!(local Server): exit _timing = _this select 0 showRadio FALSE cancelled = 0 publicvariable detectammo _PAPABEAR=[West, "HQ"]; 2 setRadioMsg "SELECT TARGET AREA" ;_PAPABEAR SideChat "Select Drop Zone " ADrop = "logic" createvehicle getpos supportairport ~1 ;onMapSingleClick "ADrop setpos _pos; go = 0"; ;@go == 0 ;go = 1 _pos = getmarkerpos "DZ"; ;ADrop setpos _pos; ;_pos = getpos phoenixleader ;_pos setMarkerPos getPos phoenixleader ADrop setpos _pos 2 setRadioMsg "TARGET SELECTED" _PAPABEAR SideChat "AmmoDrop Inbound" hint "Ammo Drop Inbound" ~0.1 ?(alive WestAir) : _vcl = "RC_Be32K" createVehicle getpos supportairport; _group = createGroup west; _newsld = "SoldierWPilot" createUnit [getpos supportairport, _group] ?(alive EastAir) : _vcl = "SU34" createVehicle getpos supportairport; _group = createGroup east; _newsld = "SoldierEPilot" createUnit [getpos supportairport, _group] ~0.5 _newsld = (Units _group) select 0 [_newsld] join grpNull _newsld moveindriver _vcl _leader = _newsld ~0.5 _marker = createMarkerLocal ["AmmoDrop", position ADrop]; _marker setMarkerShapeLocal "ICON"; _marker setMarkerTypeLocal "Destroy"; _marker setMarkerSizeLocal [.8,.8]; _marker setMarkerTextLocal _marker; _marker setMarkerColor "Colorgreen"; 2 setRadioMsg "NULL" ~0.1 _vehicle = vehicle _leader ?(alive WestAir) : x = [_vehicle] execVM "Support\markersFriend.sqf" ?(alive EastAir) : x = [_vehicle] execVM "Support\markersEnemy.sqf" _vehicle setPos [(getPos _vehicle select 0),(getPos _vehicle select 1),(getPos _vehicle select 2) + 300] ~0.5 _vel = velocity _vehicle;_dir = direction _vehicle;_speed = 100; comment "Added speed"; _vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+(cos _dir*_speed),(_vel select 2)]; _leader doMove [((getPos ADrop select 0) + 0),((getPos ADrop select 1) + 0),(getPos ADrop select 2) + 0] _vehicle disableAI "AUTOTARGET"; _vehicle disableAI "TARGET"; _vehicle enableattack false _vehicle setBehaviour "CARELESS" _leader setskill 0.9 @(_vehicle distance ADrop < 1300) or !(alive _vehicle) or (cancelled == 2) _leader doMove [((getPos ADrop select 0) + 0),((getPos ADrop select 1) + 0),(getPos ADrop select 2) + 0] _vehicle setspeedmode "limited" _vehicle setBehaviour "CARELESS" _vehicle flyinheight 100 @(_vehicle distance ADrop < 220) or !(alive _vehicle) or (cancelled == 2) _leader doMove [((getPos ADrop select 0) + 0),((getPos ADrop select 1) + 0),(getPos ADrop select 2) + 0] ?!(alive _vehicle) or !(alive _leader) : goto "cancelled" _vehicle flyinheight 100 _vehicle setspeedmode "limited" ;wait till in position _height = getpos _vehicle select 2 _dis = _height * _timing @(_vehicle distance ADrop < _dis) or (unitReady _vehicle) or !(alive _vehicle) or (cancelled == 2) ?!(alive _vehicle) or !(alive _leader) : goto "cancelled" ?(cancelled == 2) : goto "cancelled" #ammo ~1 _vel = velocity _vehicle _Ammo = "misc01" createVehicle [(getpos _vehicle select 0),(getpos _vehicle select 1),(getpos _vehicle select 2)] _Ammo SetPos [(getpos _vehicle select 0),(getpos _vehicle select 1),(getpos _vehicle select 2)] _Ammo setdir getdir _vehicle _Ammo setvelocity [(_vel select 0),(_vel select 1),(_vel select 2)] ~.1 _chute = "ParachuteWest" createvehicle [(getpos _vehicle select 0),(getpos _vehicle select 1),(getpos _vehicle select 2)] _chute setpos [(getpos _vehicle select 0),(getpos _vehicle select 1),(getpos _vehicle select 2) - 5] _chute setvelocity [(_vel select 0),(_vel select 1),(_vel select 2)] _Flare = "F_40mm_Red" createVehicle [(getPos _Ammo select 0),(getPos _Ammo select 1),(getPos _Ammo select 2) + 2]; _Flare setpos [(getpos _vehicle select 0),(getpos _vehicle select 1),(getpos _vehicle select 2) - 3] _Flare setvelocity [(_vel select 0),(_vel select 1),(_vel select 2)] _PAPABEAR SideChat "Ammo Dropped." _PAPABEAR SideChat "Heading Home." detectammo=1 ;cleans up the mission _marker setMarkerType "empty" deleteVehicle ADrop deleteMarkerLocal _Marker 2 setRadioMsg "AmmoDrop" #ammodrop _vel1 = velocity _chute ~.01 _Ammo setpos [( getpos _chute select 0),(getpos _chute select 1),(getpos _chute select 2)] _Flare setpos [(getpos _chute select 0),(getpos _chute select 1),(getpos _chute select 2) + 2] ~.01 _Ammo setvelocity [(_vel1 select 0),(_vel1 select 1),(_vel1 select 2)] _Flare setvelocity [(_vel1 select 0),(_vel1 select 1),(_vel1 select 2)] _height = getpos _Ammo select 2 ?(_height > 0.5) : goto "ammodrop"; _Smoke = "SmokeShellGreen" createVehicle getpos _Ammobox ~0.1 _Flare = "F_40mm_Green" createVehicle [(getpos _Ammo select 0),(getpos _Ammo select 1),(getpos _Ammo select 2) + 50]; ~0.1 _ammobox = "SwissAmmoBox" createvehicle getpos _Ammo _Smoke = "SmokeShellGreen" createVehicle getpos _Ammobox ~0.1 deleteVehicle _Ammo ;_tent = "" createvehicle getpos _Ammo ~0.1 ;_tent setdamage 1 ~0.1 ;deleteVehicle _Ammo ~0.1 ;[_tent] exec "Support\tent.sqs" #cancelled ;cleans up the mission ?(cancelled == 2) : _marker setMarkerType "empty" ?(cancelled == 2) : deleteVehicle ADrop ?(cancelled == 2) : deleteMarkerLocal _Marker ?(cancelled == 2) : 2 setRadioMsg "AmmoDrop" ?(cancelled == 2) : _PAPABEAR SideChat "AmmoDrop cancelled."; _PAPABEAR SideChat "Heading Home."; cancelled = 0 ?!(alive _vehicle) or !(alive _leader) : _marker setMarkerType "empty" ?!(alive _vehicle) or !(alive _leader) : deleteVehicle ADrop ?!(alive _vehicle) or !(alive _leader) : deleteMarkerLocal _Marker ?!(alive _vehicle) or !(alive _leader) : 2 setRadioMsg "AmmoDrop" ?!(alive _vehicle) or !(alive _leader) : _PAPABEAR SideChat "MayDay MayDay Im Going Down." ~1 ;move back to the place of start _leader doMove getpos supportairport _vehicle setspeedmode "full" _vehicle setBehaviour "CARELESS" ;when back at the planes starting pos it will delete the plane and pilot @(_vehicle distance supportairport < 1000) or !(alive _vehicle) ~5 deleteVehicle _vehicle ~0.2 deleteVehicle _leader ; Exit script exit Create a marker DZ, this will be the dropzone (it will follow the group leader) replace swissammobox with your ammobox. You will either need to make an array that will handle all of the added weapons of the UH and to fill the ammo crate. Share this post Link to post Share on other sites
Shadow_Spyder 0 Posted January 4, 2008 I'm not completely sure what to edit because I am not a good scripter and your script is looking like I am trying to read japanese or something lol. BUT, it looks like that is a map-click type ammo-drop. Mine needs to be completely dynamic. Made for multiplayer games where you have a human pilot who flys the chopper to any random area, and when he chooses to release the ammo on parachute, it will look as though it has fallen out of the chopper and just randomly float to the ground... maybe taking wind into account and not landing exactly under the chopper or anything.. but in the vacinity. How would I get the info on which weapons/ammo's the pilot or whoever is putting into the chopper to copy that into an ammobox? seems like I've biten off way more then I can chew.... Share this post Link to post Share on other sites
jezpops 0 Posted January 4, 2008 Ok, This script doesn't use a map click, its called in by radio and the ammo drops near the group leader, but i see what you mean. Since you cannot query the vehicles cargo itself and i assume that the player will be filling the vehicle from an ammo crate. The only way i can see that you can get the weapon/ammo type is when its taken out of an ammo box to be put into the chopper. What you are trying to do is possible, give me a week and i will hopefully have a solution. Share this post Link to post Share on other sites