Jump to content
Sign in to follow this  
Spikeles

Who needs a nuke?

Recommended Posts

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!

deathml0.th.jpg

death2ib4.th.jpg

Share this post


Link to post
Share on other sites

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×