• 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.

[Solved] Keep gold mine-based building after depleted? how?

Status
Not open for further replies.
I have a building that is made to have gold like the gold mine and workers to go inside and mine it.

Upon depletion usually the building destroyed itself instantly, but I WANT TO KEEP IT ALIVE.

So i thought about it and one idea is the spawn ability upon death, that will spawn a copy of the building but without gold ability and load+cargo ability. Problem is - what if enemy destroys it instead of getting depleted?

How to detect the difference?
 
I made it with pr114's solution.


  • Plantation check and replace when iits depleted
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Plantation
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Killing unit) Equal to No unit
        • Then - Actions
          • Unit - Replace (Dying unit) with a Plantation (Depleted) using The new unit's max life and mana
        • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top