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

Building not required to be destroyed to win

Status
Not open for further replies.
Level 1
Joined
Aug 30, 2011
Messages
4
I've added fortification walls that can be built by players and they are flagged as buildings. In a scenario where you destroy all the other players buildings, I don't want the walls to count towards this. Should I convert them to another unit type or is there an easier way?
 
If you use A unit dies as an event to keep track of them, just use a condition:
  • (Unit-type of (Triggering unit)) Not Equal to Fortification Wall
If you use a unit group to keep track of them,
  • Set Group = (Units owned by Player 1 (Red) matching (((Matching unit) is a structure) Equal to True) and ((Unit-type of (Matching unit)) Not Equal to Fortification Wall))
 
Level 1
Joined
Aug 30, 2011
Messages
4
ok, this seemed to work, though I didn't get the set group thing. thanks for the tips.

  • Events
  • Unit - A unit owned by Player 2 (Blue) Finishes construction
  • Conditions
  • (Unit-type of (Constructed structure)) Not equal to Fortified Connector
  • (Unit-type of (Constructed structure)) Not equal to Fortified Horizontal Wall
  • (Unit-type of (Constructed structure)) Not equal to Fortified Vertical Wall
  • Actions
  • If (((Constructed structure) is A structure) Equal to True) then do (Set structureCount = (structureCount + 1)) else do (Do nothing)
  • Events
  • Unit - A unit owned by Player 2 (Blue) Dies
  • Conditions
  • (Unit-type of (Dying unit)) Not equal to Fortified Connector
  • (Unit-type of (Dying unit)) Not equal to Fortified Horizontal Wall
  • (Unit-type of (Dying unit)) Not equal to Fortified Vertical Wall
  • Actions
  • If (((Triggering unit) is A structure) Equal to True) then do (Set structureCount = (structureCount - 1)) else do (Do nothing)
  • Events
  • Unit - A unit owned by Player 2 (Blue) Dies
  • Conditions
  • structureCount Less than or equal to 0
  • Actions
  • Game - Display to (All players) the text: Player 1 has won th...
 
Last edited:
Status
Not open for further replies.
Top