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

Level 5
Joined
Jan 23, 2025
Messages
40
Hello again. Let me explain the situation. Two teams of four players each.

When the first hero dies, the FirstKill trigger activates and deactivates immediately.

1778695178460.webp


I need help with the following:

- After FirstKill, when one player kills another, there should be no sound. DONE.

1778695234602.webp


- When the same player kills another player (two in total), the Double Kill audio should play.

- When the same player kills another player (three in total), the TripleKill audio should play.

- When the same player kills all four players (four in total), the Ultrakill audio should play.

The time interval between the first and second kills should be, for example, 10 seconds. Between the second and third kills, another 10 seconds, and between the third and fourth kills, another 10 seconds.

From the first hero to the last, a total of 30 seconds elapse. Thk guys! (I'm quite a noob, if it's too complicated for me I'll need a testmap)
 
lets do that

the Variable you need
( FirstBloodDone ) (Boolean)
( KillStreakCount ) ( Integer ) ( array )
( KillStreakTimer ) ( Timer ) ( array )
( TempPlayerNumber ) ( Integer )

  • kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Killing unit) is A Hero) Equal to True
      • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
    • Actions
      • Set VariableSet TempPlayerNumber = (Player number of (Owner of (Killing unit)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FirstBloodDone Equal to False
        • Then - Actions
          • Set VariableSet FirstBloodDone = True
          • Sound - Play FirstBlood <gen>
        • Else - Actions
      • Set VariableSet KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
      • Countdown Timer - Start KillStreakTimer[TempPlayerNumber] as a One-shot timer that will expire in 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 2
        • Then - Actions
          • Sound - Play DoubleKill <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillStreakCount[TempPlayerNumber] Equal to 3
            • Then - Actions
              • Sound - Play TripleKill <gen>
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillStreakCount[TempPlayerNumber] Equal to 4
                • Then - Actions
                  • Sound - Play UltraKill <gen>
                • Else - Actions
then you make a new trigger for the timer
you need to make 1 for eath player
  • Reset Kill Streak P1
    • Events
      • Time - KillStreakTimer[1] expires
    • Conditions
    • Actions
      • Set VariableSet KillStreakCount[1] = 0
 
Hi, I made some changes because the 10-second timer between heroes wasn't working.

Two minutes could pass between one hero's death and the next, and the sound would still play.

That's how I keep it, and it works wonderfully. Thank you so much.

1778782647518.webp
 
Hi, I made some changes because the 10-second timer between heroes wasn't working.

Two minutes could pass between one hero's death and the next, and the sound would still play.

That's how I keep it, and it works wonderfully. Thank you so much.

View attachment 589896
you for got to add in the frist blood if you do like i did it well only do it with the frist kill
 
Hi, I made some changes because the 10-second timer between heroes wasn't working.

I created an example map (patch 1.31.1) based on the trigger made by polardude. I did some changes to make the trigger closer to what I mind you need. The messages in the trigger are for debugging purposes only, so they are disabled.

These are the trigger codes in case anyone wants to read them without having to open the map:

  • Kill Streak Play Sound
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
      • ((Dying unit) is an illusion) Equal to False
      • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Set TempUnit = (Killing unit)
      • Set TempPlayer = (Owner of TempUnit)
      • Set TempPlayerNumber = (Player number of TempPlayer)
      • -------- Unstoppable --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Greater than or equal to 4
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Unstoppable
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = Warning <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Ultra Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 3
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Ultra Kill
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = ItemReceived <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Triple Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 2
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Triple Kill
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = Hint <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Double Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 1
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Double Kill
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = GoodJob <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- First Blood --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 0
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: First Blood
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = ClanInvitation <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Start Timer --------
      • Countdown Timer - Start TempTimer[TempPlayerNumber] as a One-shot timer that will expire in 10.00 seconds
      • -------- Release Variables --------
      • Set TempUnit = No unit
      • Custom script: set udg_TempPlayer = null

  • Kill Reset Kill Streak Count
    • Events
      • Time - TempTimer[1] expires
      • Time - TempTimer[2] expires
      • Time - TempTimer[3] expires
      • Time - TempTimer[4] expires
      • Time - TempTimer[5] expires
      • Time - TempTimer[6] expires
      • Time - TempTimer[7] expires
      • Time - TempTimer[8] expires
    • Conditions
    • Actions
      • For each (Integer TempLoop) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for TempTimer[TempLoop]) Equal to 0.00
            • Then - Actions
              • Set TempPlayerNumber = TempLoop
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillStreakCount[TempPlayerNumber] Greater than 0
                • Then - Actions
                  • Set KillStreakCount[TempPlayerNumber] = 0
                  • Game - Display to (All players) for 5.00 seconds the text: (Kill Streak Count reseted for + (Name of (Player(TempLoop))))
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions

Some important tips about triggers in GUI for beginners: Things You Should Know When Using Triggers / GUI
 

Attachments

Last edited:
Oh thank you, I'm going to download it.

EDIT

First Blood should be separate from killstreaks.

That sound only plays once per match.Then come the killstreaks.

The first one has no sound, the second is a double kill, the third a triple kill, and the last one a mega kill.

I adapted Polardude's example and it works. I could adapt yours too. Thanks, guys!
 
Last edited:
Oh thank you, I'm going to download it.

EDIT

First Blood should be separate from killstreaks.

That sound only plays once per match.Then come the killstreaks.

The first one has no sound, the second is a double kill, the third a triple kill, and the last one a mega kill.

I adapted Polardude's example and it works. I could adapt yours too. Thanks, guys!
:eek:2 I'm sorry. In my time zone it was midnight and I was sleepy :xxd:

I corrected the triggers and the test map as you requested.

  • Kill Streak Play Sound Updated
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
      • ((Dying unit) is an illusion) Equal to False
      • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Set TempUnit = (Killing unit)
      • Set TempPlayer = (Owner of TempUnit)
      • Set TempPlayerNumber = (Player number of TempPlayer)
      • Set TempTrigger = (This trigger)
      • -------- Mega Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Greater than or equal to 3
          • (Execution count of TempTrigger) Greater than or equal to 2
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Mega Kill
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = ItemReceived <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Triple Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 2
          • (Execution count of TempTrigger) Greater than or equal to 2
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Triple Kill
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = Hint <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Double Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 1
          • (Execution count of TempTrigger) Greater than or equal to 2
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Double Kill
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Sound - Stop TempSound Immediately
          • Set TempSound = GoodJob <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Start Kill Streak Count After First Blood --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillStreakCount[TempPlayerNumber] Equal to 0
          • (Execution count of TempTrigger) Greater than or equal to 2
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Start Kill Streak C...
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
        • Else - Actions
      • -------- First Blood --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Execution count of TempTrigger) Equal to 1
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: First Blood
          • Set KillStreakCount[TempPlayerNumber] = (KillStreakCount[TempPlayerNumber] + 1)
          • Set TempSound = ClanInvitation <gen>
          • Sound - Play TempSound
        • Else - Actions
      • -------- Start Timer --------
      • Countdown Timer - Start TempTimer[TempPlayerNumber] as a One-shot timer that will expire in 10.00 seconds
      • -------- Release Variables --------
      • Set TempUnit = No unit
      • Custom script: set udg_TempPlayer = null
      • Custom script: set udg_TempTrigger = null

  • Kill Reset Kill Streak Count Updated
    • Events
      • Time - TempTimer[1] expires
      • Time - TempTimer[2] expires
      • Time - TempTimer[3] expires
      • Time - TempTimer[4] expires
      • Time - TempTimer[5] expires
      • Time - TempTimer[6] expires
      • Time - TempTimer[7] expires
      • Time - TempTimer[8] expires
    • Conditions
    • Actions
      • For each (Integer TempLoop) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for TempTimer[TempLoop]) Equal to 0.00
            • Then - Actions
              • Set TempPlayerNumber = TempLoop
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillStreakCount[TempPlayerNumber] Greater than 0
                • Then - Actions
                  • Set KillStreakCount[TempPlayerNumber] = 0
                  • Game - Display to (All players) for 5.00 seconds the text: (Kill Streak Count reseted for + (Name of (Player(TempPlayerNumber))))
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
 

Attachments

Back
Top