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

[Trigger] Victory Conditions problem

Status
Not open for further replies.
Level 2
Joined
Aug 31, 2008
Messages
27
Hello Hive community . I need help with the winning conditions .
First of all , I am making a map , something like and Labyrinth Arena .
I want to set the victory conditions so when Team 1 or Team 2 gets 40 kills , the Team to get them wins the game and teh otehr one looses . But i really dont know how . Im really a mega noob with triggers and have no idea what to do .
I found this :


Event:A unit is killed
Actions:
If killing unit is owned by team one
then set kills1 integer=kills1 integer + 1
else do nothing
If killing unit is owned by team two
then set kills2 integer=kills2 integer + 1
else do nothing
if kills1 integer is greater than 499
then victory for team1
defeat for team2
if kills2 integer is greater than 499
then victory for team2
defeat for team1


But as i said before i really dont know what a trigger is , im a noob with triggers so if there is another way to modify the winning condiotions . If not can you explain me , in [RAINBOW]details[/RAINBOW] how do i set those conditions .
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Open the World Editor and press the Trigger Editor button (F4). There you can make triggers. I suggest you fool around with it a bit and check all possible events, conditions and actions you can make. There are plenty of tutorials on this forum that can help you understand things.

Good luck.
 
Level 4
Joined
Aug 1, 2007
Messages
66
In this example you need to create 2 variables to keep track of the kills. Both are integer variables, one named Team1Kills, the other Team2Kills. Also in this example team 1 is players 1-6 and team 2 is players 7-12. I'm also assuming you only want to count hero deaths.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Set Team1Kills = (Team1Kills + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Team1Kills Equal to 40
            • Then - Actions
              • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
                • Loop - Actions
                  • Game - Victory (Picked player) (Show dialogs, Show scores)
              • Player Group - Pick every player in (All allies of Player 7 (Green)) and do (Actions)
                • Loop - Actions
                  • Game - Defeat (Picked player) with the message: Defeat!
            • Else - Actions
        • Else - Actions
          • Set Team2Kills = (Team2Kills + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Team2Kills Equal to 40
            • Then - Actions
              • Player Group - Pick every player in (All allies of Player 7 (Green)) and do (Actions)
                • Loop - Actions
                  • Game - Victory (Picked player) (Show dialogs, Show scores)
              • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
                • Loop - Actions
                  • Game - Defeat (Picked player) with the message: Defeat!
            • Else - Actions
 
Last edited:
Level 2
Joined
Aug 31, 2008
Messages
27
Thank you verry much ! Now ill eb able to do what i want !

Edit---------
Wow it really worked :D tnx ^^ now ill try to make a multiboard :D
Thank you verry much Richardsteel ^^
 
Last edited:
Status
Not open for further replies.
Top