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

[Trigger] Kill count?

Status
Not open for further replies.
Just use a certain event, i.e. a periodic trigger
like
  • Events
    • Every 1 seconds of the game
  • Conditions
  • Actions
    • If killcount[1] is equal to x then do stuff else do nothing
    • If killcount[2] is equal to x then do stuff else do nothing
    • If killcount[3] is equal to x then do stuff else do nothing
    • If killcount[4] is equal to x then do stuff else do nothing
    • If killcount[5] is equal to x then do stuff else do nothing
    • ...
//Edit: 800, here i come :p
 
It's a very simple trigger:

  • Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Killcount[(Player number of (Owner of (Dying unit)))] = (Killcount[(Player number of (Owner of (Dying unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Killcount[(Player number of (Owner of (Dying unit)))] Greater than 10
        • Then - Actions
          • Game - Display to (All players) the text: Action
        • Else - Actions
The variable is an integer with array (1) This will make it work for every player.

EDIT - If you want a value like an integer to work for all players, you have to set the array value to (1). A newbeginner's mistake is to set the the value to (12) Because it's 12 players.
 
EDIT - If you want a value like an integer to work for all players, you have to set the array value to (1). A newbeginner's mistake is to set the the value to (12) Because it's 12 players.

Not that I have anything against 1, but why wouldn't 12 work, exactly ?
I'm not sure if it even does anything, after all, all the arrays are always 8192 (or whatever it was), but even if it does something, an array of 12 for 12 players shouldn't have any problems.
 
that doesn't help -.-

kakaksm0.jpg
 
Oh NVM, solved.

CRAP:

  • Kill Count
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set killcount[(Player number of (Owner of (Killing unit)))] = (killcount[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player number of (Owner of (Killing unit))) Equal to 1
        • Then - Actions
          • Sound - Play firstblood <gen>
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero as just made a First Blood.)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of (Owner of (Killing unit))) Equal to 3
            • Then - Actions
              • Sound - Play Killing_Spree <gen>
              • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is on a Killing Spree.)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Player number of (Owner of (Killing unit))) Equal to 5
                • Then - Actions
                  • Sound - Play Unstoppable <gen>
                  • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is |c00ff0000UNSTOPPABLE|r.)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Player number of (Owner of (Killing unit))) Equal to 7
                    • Then - Actions
                      • Sound - Play HolyShit <gen>
                      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is crazy. |c00ff0000Holy Shit|r.)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Player number of (Owner of (Killing unit))) Equal to 10
                        • Then - Actions
                          • Sound - Play GodLike <gen>
                          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is |c00ff0000GODLIKE|r.)
                        • Else - Actions
It always say FIRST BLOOD, with any kill counting XD
 
Last edited:
Oh NVM, solved.

CRAP:

  • Kill Count
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set killcount[(Player number of (Owner of (Killing unit)))] = (killcount[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player number of (Owner of (Killing unit))) Equal to 1
        • Then - Actions
          • Sound - Play firstblood <gen>
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero as just made a First Blood.)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of (Owner of (Killing unit))) Equal to 3
            • Then - Actions
              • Sound - Play Killing_Spree <gen>
              • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is on a Killing Spree.)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Player number of (Owner of (Killing unit))) Equal to 5
                • Then - Actions
                  • Sound - Play Unstoppable <gen>
                  • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is |c00ff0000UNSTOPPABLE|r.)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Player number of (Owner of (Killing unit))) Equal to 7
                    • Then - Actions
                      • Sound - Play HolyShit <gen>
                      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is crazy. |c00ff0000Holy Shit|r.)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Player number of (Owner of (Killing unit))) Equal to 10
                        • Then - Actions
                          • Sound - Play GodLike <gen>
                          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + 's hero is |c00ff0000GODLIKE|r.)
                        • Else - Actions
It always say FIRST BLOOD, with any kill counting XD
So what? o.O
 
Status
Not open for further replies.
Back
Top