Home   Help Search Login Register  

Author Topic: Destroying large amounts of buildings  (Read 1725 times)

0 Members and 1 Guest are viewing this topic.

Offline Rellikki

  • Members
  • *
  • Die-hard OFP player
Destroying large amounts of buildings
« on: 30 Jun 2009, 23:18:28 »
I was wondering if there's any easy way to destroy large amounts of buildings? I want to put a whole town into ruins, but typing the setDamage command for every each one of the building IDs is arduous. Creating explosions in the town is out of question too, because there's some life in the town.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Destroying large amounts of buildings
« Reply #1 on: 30 Jun 2009, 23:36:54 »
As a rough direction for you, it's probably possible to return all buildings using the nearestObjects command (http://community.bistudio.com/wiki/nearestObjects) and cycling through the returned array, using setDamage to ruin them.

Offline Rellikki

  • Members
  • *
  • Die-hard OFP player
Re: Destroying large amounts of buildings
« Reply #2 on: 30 Jun 2009, 23:57:48 »
Yes, it works perfectly. Thanks.