Marius
  • Marius
  • 59% (Neutral)
  • Private Topic Starter
13 years ago
So I'm making a map with a rather large city that will host some battles, but if the battle drags on I don't want the city irreversibly destroyed. I could just set the buildings to all be indestructible, but then the only way to clear house is with rangers, toxins, flame, etc. What I really want is a way to allow the buildings to take damage to the point where they become ungarrisonable, but then stop taking damage. Ideally they would be repairable afterwards back to the point where they can be garrisoned again. I was looking at scripting it, but a) I can't find a script condition for 'unit takes x% damage' and b) can't find a way to turn off destructibility. Any thoughts?
Sponsor
i^love^mixery
13 years ago
there is no proper way to do that without ini file.

you could script it like this:


*** IF ***
Unit 'Building01' Health IS Less Than  10  percent. (Health -> Unit health compared to value)
*** THEN ***
Unit 'Building01' changes the value of flag Object Flag: Indestructible to TRUE. (Unit -> Affect flags set on object panel)

but there is one problem: nuke rockets for example kill a building in one blow so this script cant do anything about it.

also i dont quite see the point in this..