Jump to content

Sign in to follow this  
calo_mir

Destroying town without actually... destroying town

Recommended Posts

Yes, enigmatic thread title, I know.

I'd like to destroy all the buildings in Strelka and put a military encampment on top of the ruins. The problem is that using something like:

{ _x setDamage 1.0; } forEach nearestObjects ...

... will create a large explosion as all the buildings collapse, destroying any units I put nearby.

Is there some way to just put all the buildings directly into a 'destroyed' state so that nearby units don't get killed?

Share this post


Link to post
Share on other sites

I don't know if there is away to start with demolished buildings but this may be good enough

You can try turning off damage

protect = nearestObjects [gamelogic, ["man"], 70];{_x allowdamage  false} foreach protect; 

Knock down your buildings (note don't use empty [] as it will still kill soldiers.

buildings = nearestObjects [gamelogic, ["buildings"], 50];{_x allowdamage  true} foreach buildings;

Re-enable damage

protect = nearestObjects [gamelogic, ["man"], 70];{_x allowdamage  true} foreach protect; 

Share this post


Link to post
Share on other sites

Hm, yeah that might do it.

There is another problem with destroying the buildings and that's that I seem to get about 20 minutes of secondary explosions. I think this is a known bug.

Share this post


Link to post
Share on other sites
  calo_mir said:
Hm, yeah that might do it.

There is another problem with destroying the buildings and that's that I seem to get about 20 minutes of secondary explosions. I think this is a known bug.

Must be I never had that problem with buildings, maybe gas leaks.

I forgot you may need delays between each command.

Share this post


Link to post
Share on other sites
  calo_mir said:
Hm, yeah that might do it.

There is another problem with destroying the buildings and that's that I seem to get about 20 minutes of secondary explosions. I think this is a known bug.

Your lucky if that's your only issue... I was doing some IED tests in a small town and put the blast radius to 200 meters instead of 20 meters.

That was an automatic crash to desktop without having saved my mission before. :j:

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  

×