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

Defining Buildings

Status
Not open for further replies.
Level 3
Joined
Dec 4, 2010
Messages
38
Hey,

I have a quick question: how does one use a trigger to define if a building has been built or destroyed.

Ex. A quest to build a barracks, train five footmen, and destroy the enemies' barracks.

Thanks.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
  • Trig 1
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Barracks
    • Actions
  • Trig 2
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Footman
    • Actions
      • Set FootmanAmount = (FootmanAmount + 1)
  • Trig 3
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Barracks
      • (Owner of (Triggering unit)) Not equal to Player 1 (Red)
    • Actions
Use those.
 
Level 3
Joined
Dec 4, 2010
Messages
38
Thanks so much, but one more thing: when doing the first event, "Specific Unit Event" does not have "Finishes Construction", while "Player-Owned Unit Event" does. Is there a reason for this? Purely curious.
 
Level 3
Joined
Dec 4, 2010
Messages
38
I've one more question, if anyone is still around.
How does one use this trigger to make/destroy more than one building?

eg. Build a barracks and a blacksmith, make x amount of units, destroy the corresponding barracks and blacksmith of an enemy.
 
Status
Not open for further replies.
Top