Spikeles 0 Posted March 21, 2007 Ah.. where would we be without scripting? This is the result of my carpet bomb script... 10,000 GBU's... needless to say my computer didn't like it very much when they landed.. though i did get the enemy tank! Share this post Link to post Share on other sites
Falken 0 Posted March 21, 2007 This is awesome, but could you post the script? Share this post Link to post Share on other sites
celery 8 Posted March 21, 2007 Exactly what my cheat pack needs. Share this post Link to post Share on other sites
Spikeles 0 Posted March 21, 2007 I knew someone would end up asking why.. my answer? Why not? Because i could? But mainly i was just porting old OFP scripts over and testing out the SQF syntax. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// get the unit from the first argument to use as the center point of the drop _unit = _this; // Width and height of the box that will be filled with bombs _width = 1000; _height = 1000; // the step size while creating bombs, divide width by this to get the number of bombs per row, and divide height by this to get the number of bombs per column // This step can be any number, but anything below about 200 will bring your computer to a crawl, possibly stalling it for up to 10mins while the game tries to figure out what to do _step = 200; _pos = position _unit; // Setup the start point of the grid _startX = (_pos select 0) - (_width / 2); _startY = (_pos select 1) - (_height / 2); // Loop through the width and height generating a bomb at each step for [{_x=1},{_x<=_width},{_x=_x+_step}] do { for [{_y=1},{_y<=_height},{_y=_y+_step}] do { _posX = _startX + _x; _posY = _startY + _y; // Generate a bomb 100 units in the air at the point _bomb = "Bo_GBU12_LGB" CreateVehicle [ _posX, _posY, 100 ]; } Share this post Link to post Share on other sites
kronzky 5 Posted March 21, 2007 You could've saved yourself a lot of trouble: Object Placer Share this post Link to post Share on other sites
Spikeles 0 Posted March 21, 2007 You could've saved yourself a lot of trouble: Object Placer And where is the fun in that? I do it myself to learn, can't learn if i just use already pre-done ones. Share this post Link to post Share on other sites