Jump to content
Sign in to follow this  
BLSmith2112

Wiping out a whole pre-placed city. Possible?

Recommended Posts

I've got this nuke script, but it doesnt do any damage and would like to create a script in which it would distroy near everything within 1000m of the detonation point. Will I need to "setdammage 1" for each object? How would I go about doing this? Thanks

Share this post


Link to post
Share on other sites

Search my name and come up with my burning buildings script.

In there, there is a demo of setting a whole town on fire wink_o.gif. Now, I don't suggest you use it as is, but using the basic process in there, you can figure it out easilly enough for sure.

Share this post


Link to post
Share on other sites

Yea I tried your burning building script Colonel. Quite cool.

I will give that a try. Good thinking smile_o.gif

Share this post


Link to post
Share on other sites

If the flame animation could become invisible and the damage caused by the "flame" could be significantly increased, the buildings essentially would all fall down quicker.. but the lag in "burning" 40+ buildings down would be tremendous. this is really why I want to just have the buildings collapse rather than burn down.

How could I do it?

Share this post


Link to post
Share on other sites
Guest

{if (_x != player) then {_x setDamage 1}} forEach ((getmarkerPos "CorazolBridge") nearObjects 75)

Put into a trigger activation feild, or whatever

in this case, marker pos was used to destroy corazol bridge and sourounding stuff too

the last number in there, 75 is range, dont reccomend going out too far, as it can get laggy, 200 m might be relatively safe

Problems -

1: knock down a number of buildings, especially gettin past like 3 or 4 at once, it can lag badly (least for me)

2: this does not destroy all the objects unfortunately, it will take care of buildings for sure - trees and some fences, etc will be left over

Only solution otherwise I can provide is to set dammage 1 for each ID number on map in area u want hit:

Put in a gamelogic near the object or objects to destroy

Put this in the gamelogics Init feild:

{(getPos this nearestobject _x) setDammage 1} ForEach [256218,581174,581173,581172,174839,174838]

Delete my object Id's and put whatever ones u want in (or only one, whatever)

Although its stated this command only works up to 50m from center point, I get it to work fine within 200 to 300 meters at least.

Ya, ud have to manually write down all the id numbers, but, it would clear everything that has an Id number on the map, this should only leave a few possible patches of trees in any green shaded areas on map.

Share this post


Link to post
Share on other sites

Have you tried decompiling the OFP nuke addon and seeing how it was done in that?

Share this post


Link to post
Share on other sites

NukeAddon? I believe it was a nuke script and that nuke had no damaging what-so-ever... just a flash, a smoke cloud, and poof dats it.

Share this post


Link to post
Share on other sites

i have a damage that will dammage any building in 1000 meters.

nukedammage.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_i = 0

~2

_ce = _this select 0

#loop

_btd = nearestobjects [_ce,["building"],_i]

{_x setdammage 1 } foreach _btd

~.4

_i = _i +30

?( _i > 1000 ) : goto "end"

goto "loop"

#end

to test put a car in middle of a city and inside init line

put [] exec "nukedammage.sqs"

you can change 1000 to larger or smaller depend on lag factor

you can change _i = _i + 30 to any number and it will hit every building if smaller or miss some if larger about 100

Share this post


Link to post
Share on other sites

is there a way to knock down all trees in a marker area?

I just did a mission where you are going into a forest after you arty striked it.... i am using a good fog effect and il look into making its colour more hazy, but i want certain trees to be knocked down, the map is thirsk, there are over 300 trees to knock down, individual IDs could get really tedious and i might miss a couple...

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  

×