general 0 Posted March 26, 2004 I want a plane to bomb a special area whid infantry. exanple in PMC fury when a plane drop some bombs on a spetz natz camp. ok I know that it's a topic about this thing but I can't understand the code sambles. so I have a plane and it's named "plane1". it's grouped as "grp1" and I've set up tree waypoints for it. can eny1 just put a code samble that I can copy to OFP. (it doesn't matter if you put in text to explain, I wont understand it) Share this post Link to post Share on other sites
Nathanz 0 Posted March 26, 2004 Carpet bombing you mean ? Theres a few scripts like that on ofpec.com BUT its down at the moment Share this post Link to post Share on other sites
MrZig 0 Posted March 26, 2004 You COULD have it fire it's bombs.. With the fire command, but then you'll need to time it and such. Do you want the plane flying and bomb it? Or do you want freefall bombs coming from the sky to bomb it? The latter would be easier, the first, hmm.. Share this post Link to post Share on other sites
sanctuary 19 Posted March 27, 2004 An example , just adapt it to your own mission I have an A10 with LGB, its name is PLANE1 and its Special is set to Flying I create a MOVE waypoint for it , far away In the waypoint properties, i set the Combat Mode to NEVER FIRE and the behaviour is set to CARELESS By doing that , the A10 will fly without trying to engage any target , and fly NOT away from the straight line i want it to fly At the average location of where i want the A10 to launch a bomb , i create a trigger (of course , i place the trigger somewhere i know the A10 will go) In the trigger properties, at the line On Activation , i put <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">PLANE1 Fire "LaserGuidedBombLauncher" Then, i press F2 (or i click on Group) and i create a blue line between the A10 and the trigger (for this, after pressing F2 or clicking on Group , just click on the A10 and leave the mouse button pressed , move your mouse cursor to the trigger and stop playing the mouse button) By doing this the trigger will be activated ONLY by the A10. You can create other trigger (or just copy paste the same trigger several time) if you want other LGB fired by the A10, just link them to the A10 the same way you just did for the first trigger . Put several of those trigger in a line and you will see a kind of carpet bombing. Now, adapt this example to your mission I hope it is easy to understand Share this post Link to post Share on other sites
Harnu 0 Posted March 28, 2004 If the area is static or you know exactly where you want these bombs to drop, instead of complex solutions, why not just have the A10 fly past, and you can camcreate LGB's onto pre-set locations (Using gamelogics or empty objects). Share this post Link to post Share on other sites
-=BT=- Matty R 0 Posted March 28, 2004 pls could any1 make a test mission for cam creating bombs when i do it it always comes up with a error and dont work could somebody help me Share this post Link to post Share on other sites
-75th-Wacky_Iraqi-LtC- 0 Posted March 28, 2004 i don't know what you mean general, or what the others are trying to tell you (because i don't know crap about coding) but if you want carpet bombing, hehe, go d/l my good pal B-52, now THATS a carptet bomber *lokks away innocently is if he killed tens of thousands of civies by carpet bombing them, then whistles, then RUNS!!!* i don't have a d/l link for it, but i could look for it Share this post Link to post Share on other sites
HuNtA 0 Posted March 28, 2004 yeh, plz do. Or do what a m8 did. open any plane config, and give it a new bomb weapon that has mags of 100 bombs Share this post Link to post Share on other sites
Harnu 0 Posted March 29, 2004 Wacky_Iraqi[LtC] @ Mar. 28 2004,10:33)]i don't know what you mean general, or what the others are trying to tell you (because i don't know crap about coding) but if you want carpet bombing, hehe, go d/l my good pal B-52, now THATS a carptet bomber *lokks away innocently is if he killed tens of thousands of civies by carpet bombing them, then whistles, then RUNS!!!* i don't have a d/l link for it, but i could look for it I don't think it's really a matter of what plane is being used, but how to get the plane to drop the bombs where he wants. Share this post Link to post Share on other sites
ozonearmafrek 10 Posted November 9, 2010 (edited) hi guys im trying to get a ai to Carpet Bomb a town with no one in it b52 im using can someone help me plz!!!!! Edited November 9, 2010 by ozonearmafrek Share this post Link to post Share on other sites
SilverRanger 11 Posted November 9, 2010 (edited) If I may offer a bit of simple scripting... call a script with these params [nameOfPlane,nameOfTargetObject or Object ID#,number of bombs to drop,distance to target] exec "carpetBombing.sqs" (example: [Plane116,Tank251,30,500] exec "carpetBombing.sqs") _plane = _this select 0 _target = _this select 1 _bombs = _this select 2 _distance = _this select 3 @(_plane distance _target) <= _distance #dropBombs _bomb = "LaserGuidedBomb" camCreate [(getpos _plane select 0),(getpos _plane select 1),(getpos _plane select 2)-2] _bombs = _bombs - 1 ? _bombs <= 0 : exit ~0.5 goto "dropBombs" just place any plane and give it a CARELESS/NEVER FIRE waypoint as Sanctuary suggested and have it fly over the target. call the script through the trigger or an init field and you get an easy carpet bombing. with a simple trigger (plane in thislist) you can delete the distance parameter from the script, but I put it in case you prefer to use this method instead also the bombs created will have no initial speed and basically drop like rocks to the ground. for more realistic trajectories, try adding _x = (velocity _plane select 0)/2 _y = (velocity _plane select 1)/2 _z = (velocity _plane select 2)-20 _bomb setvelocity [_x,_y,_z] add this below the camCreate line to give the falling bombs a boost... you can use any type of plane to do this, regardless of what weapons it carries, and if you abuse the number of bombs dropped, you get a real bang :D:D:D -----edit------- and something I forgot about If you are planing to use a large plane for this (c130,b52, etc) you may want to adjust the distance from the plane at which the bombs are created to avoid colliding with them (getpos _plane select 2)-2 Edited November 9, 2010 by SilverRanger Share this post Link to post Share on other sites