• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger Help ^^

Status
Not open for further replies.
Level 3
Joined
Feb 1, 2012
Messages
31
I started creating a World of Warcraft MoP Battleground map ( That means its a RPG map) . I am aware that it wont be so great since i know so little about World Editor . But Hey ! I'm still having fun doing these , and ,who knows !? Maybe some one will enjoy playing my map when it will be finished.

So , i want to create a big jungle where players will accidentally meet and kill each other. So , i want to create a trigger , that , when one team kills 100 players , the game will end, and they will win . The map will be 6v6 (alliance vs Horde)

Well , thank you for reading and maybe feedback. I hope that someone could help me out . A Screen Shot , Tutorial , Description of how to do that will be great. Thank you
 
Level 5
Joined
Nov 30, 2012
Messages
200
You will need to use variables for this. Since you are new to WE, here is a nice tutorial regarding variables: http://world-editor-tutorials.thehelper.net/variables.php

Here is a sample trigger to make a Leaderboard, which keeps track of how many kills there have been.


  • Leaderboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Kills
      • Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Horde Kills: and value 0
      • Leaderboard - Add Player 2 (Blue) to (Last created leaderboard) with label Alliance Kills: and value 0
      • Leaderboard - Show (Last created leaderboard)
Here is another trigger that keeps track of how many kills there have been. It only fires if a hero has been killed, which I assume is what you are looking for (if it is an AoS map, then units should not count).

  • End Game
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set Unit = (Killing unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of Unit) is an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Set Horde_Kills = (Horde_Kills + 1)
        • Else - Actions
          • Set Alliance_Kills = (Alliance_Kills + 1)
      • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Horde_Kills Greater than or equal to 100
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Run Horde Wins <gen> (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Alliance_Kills Greater than or equal to 100
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Trigger - Run Alliance Wins <gen> (ignoring conditions)
            • Else - Actions
As you can see, three Variables are used: Unit (which stores the unit that killed the other), Horde_Kills, and Alliance_Kills (these store how many kills there have been).

If there is a kill and it is a hero who has died the trigger will fire. If the killing unit is an ally of Player One (Red), the Horde will get a kill, else the kill will go to the Alliance as there is no other option. Once one team gets 100 kills, the team will win. You decide what happens in those triggers, which I called Horde Wins and Alliance Wins.

I hope this helped, and if you have any questions, don't hesitate to ask! :goblin_yeah:
 
Status
Not open for further replies.
Top