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

Kill to win trigger and settings

Status
Not open for further replies.
Level 7
Joined
Apr 13, 2008
Messages
183
Hi All!
So I'm making an arena map and I need some help with a trigger - I need a trigger with which player 1 (the Host) can set the number of kills needed to win the game. Example:
-set kills 15
After killing 15 Shades (arena monsters) you win the game. Please help :grin:
Thank YOU!
 
Wow, I actually made this trigger along time ago on one of my unreleased maps. Here you go, this is what I used :

Set the number of kills to 15 lets say :
  • number of kills to win 15
    • Events
      • Player - Player 1 (Red) types a chat message containing -set kills 15 as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: The host has decide...
      • Set kills_to_get = 15
      • Trigger - Turn off (This trigger)
Then to make the team win :

  • West wins
    • Events
      • Unit - A unit Dies
    • Conditions
      • Kills_Team_1 Equal to kills_to_get
    • Actions
      • Game - Display to (All players) the text: Team 1 has won the game!
To add points :

  • Revival timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A ground unit) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Dying unit)) Equal to Player 12 (Brown)
        • Then - Actions
          • Set Kills_Team_1 = (Kills_Team_1 + 1)
You do not have to give credits or anything. This is just a very basic trigger :). If you have any questions just ask :).
 
Well.. this is not actually what I wanted :\ . My idea was that the host can set the kills to whatever number he wants.
-Set Kills 1,2,3,4,5,6,7... and so on. Even if he types set kills 100 it would set them to 100. Thanks anyway, now I just have 1 more trigger in mind... (that I will post in the trigger forum)
 
It can be done:
  • NumberOfKillsToWin
  • Events
    • Player - Player 1 (Red) types a chat message containing "#kills " as a substring
  • Conditions
  • Actions
    • Set killsToGet = (Integer(SubString(GetEntered String, 6, (Length of (Entered Chat String))))
    • Game - Display to (All players) the text: YOUR_TEXT
    • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Back
Top