• 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] Kill count?

Status
Not open for further replies.
Level 28
Joined
Mar 25, 2008
Messages
2,955
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
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
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.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
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.
 
Level 15
Joined
Jan 27, 2007
Messages
948
that doesn't help -.-

kakaksm0.jpg
 
Level 15
Joined
Jan 27, 2007
Messages
948
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:
Level 28
Joined
Mar 25, 2008
Messages
2,955
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.
Top