• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Victory Condition

Status
Not open for further replies.
Level 2
Joined
Apr 18, 2013
Messages
6
hello every1, first time posting here.
anyway i need help with making my first map on WC3 editor. i am trying to make a victory condition where if you destroy all the other opponents HQ's you win, but if your HQ is destroyed you lose, just need help with the victory condition part though.
all help is appreciated
 
hello every1, first time posting here.
anyway i need help with making my first map on WC3 editor. i am trying to make a victory condition where if you destroy all the other opponents HQ's you win, but if your HQ is destroyed you lose, just need help with the victory condition part though.
all help is appreciated

So you are making a melee map and you want its condition to be when you destroy th enemies HQ or in other word's enemy bases? If that is the case, well actually that is very easy just put this trigger and it will set the Victory and Defeat Condition for MELEE... if you are trying to make a MELEE map that is...

  • Melee Game - Enforce victory/defeat conditions (for all players)
 
yeah, but there is 3 bases, i have made it so if i destroy one i win, but i cant get after ive killed all of them i win
 
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A town-hall-type unit) Equal to True
    • Actions
      • Set group = (Units in (Playable map area))
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Set unit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (unit is alive) Equal to True
              • (unit is A town-hall-type unit) Equal to True
              • (Owner of unit) Not equal to (Triggering player)
            • Then - Actions
            • Else - Actions
              • Unit Group - Remove unit from group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in group) Equal to 0
        • Then - Actions
          • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_group)
      • Custom script: set udg_group = null
This counts the number of alive town halls in the map, it doesn't include the town halls of the killing player.
 
so its a 4 player free for all, when any one player destroys the other three players bases that player wins
 
oh sorry i didnt see the trigger bit lol, like i said its my first time using this.... Thanks soo much guys really appreciate it
 
Status
Not open for further replies.
Back
Top