• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Damage to a Building

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2011
Messages
182
Hi, Is there a way of change the damage deal to a ALL buildings under construction.

I have Bribe GUI Damage Engine.

PD* Just under construction. When they are finish set the dmg to normal.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can add the building to a unit group when construction starts, and remove it when the construction ends.
When a unit is damaged, check if the attacked unit is in that group. If it is, modify damage.

  • Add Structure
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to ConstructingStructures
  • Remove Structure
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Unit Group - Remove (Triggering unit) from ConstructingStructures
 
Level 6
Joined
Apr 23, 2011
Messages
182
You can add the building to a unit group when construction starts, and remove it when the construction ends.
When a unit is damaged, check if the attacked unit is in that group. If it is, modify damage.

Um okey going to try it^^
Can that cause problems in the long period? I mean that if there are a lot of building = (300 aprox) the damage engine will bug?
 
Status
Not open for further replies.
Top