• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Victory by destroying all buildings

Status
Not open for further replies.
Level 3
Joined
Oct 9, 2010
Messages
37
How can I do it so that I win when I destroy all of the enemy player's buildings without using the melee trigger? I checked the second WoL mission, because I know that's such a mission, but I drowned in my own confusion of the triggers.

There is a "check if a player's buildings are destroyed" trigger, where there's a condition that says:

(Number of Living units in (Any units in Anywhere owned by player PLAYER_01_USER matching Required: Prevent Defeat, with at most Any Amount)) == 0

I understand that trigger... almost. How does the editor know "Prevent Defeat" is buildings? Or to ask differently, can someone explain all this to me? I'm sure it's very simple, but I'm getting confused.
 
There's actually a flag in the data editor for units that is called "Prevent Defeat".

Blizzard generally uses this so that buildings will prevent you from losing as long as you have them.

However, the reason for using this and not a simple "is building" check is because some things that are technically buildings, such as creep tumors, do not prevent you from losing (ie, if you have 1 creep tumor you lose, but 1 pylon you don't.)
 
So if I copy that trigger and apply it to the enemy, I will win when I destroy all his buildings?

Alternatively, if I wanted a unit or a creep tumor to be destroyed in order to win, I simply flag them as "prevent defeat"?
 
Status
Not open for further replies.
Back
Top