• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

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