• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

KILL STREAK

Status
Not open for further replies.
Level 4
Joined
Jan 27, 2020
Messages
51
Whats the Wrong in my Trigger it doesnt work when i killed a more than 2 heroes the sound the should be said is not working
  • kill streak timed
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Owner of (Dying unit)) is in PlayerRED) Equal to True
                  • ((Owner of (Killing unit)) is in PlayerYELLOW) Equal to True
                  • And - All (Conditions) are true
                    • Conditions
                      • ((Owner of (Killing unit)) is in PlayerRED) Equal to True
                      • ((Owner of (Dying unit)) is in PlayerYELLOW) Equal to True
        • Then - Actions
          • Set KillStreakTimed[(Player number of (Owner of (Killing unit)))] = (KillStreakTimed[(Player number of (Owner of (Killing unit)))] + 1)
          • Set KillStreakTimerPlayer[(Player number of (Owner of (Killing unit)))] = (Owner of (Killing unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillStreakTimed[(Player number of (Owner of (Killing unit)))] Equal to 2
            • Then - Actions
              • Unit - Create 1 Double Kill for (Owner of (Killing unit)) at (Center of Hero Creation <gen>) facing Default building facing degrees
              • Unit Group - Add (Last created unit) to KillStreaks[(Player number of (Owner of (Killing unit)))]
              • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
              • Wait 1.50 seconds
              • Sound - Play KillStreakSoundsTimed[KillStreakTimed[(Player number of (Owner of (Killing unit)))]]
              • Game - Display to (All players) the text: (PlayerNames[(Player number of (Owner of (Killing unit)))] + ( + (just got a + |c000000FFDouble Kill|r !)))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillStreakTimed[(Player number of (Owner of (Killing unit)))] Equal to 3
                • Then - Actions
                • Else - Actions
        • Else - Actions
and also i have a player setup to make who killed the hero what team he/she is

  • Setup Players
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- All Players --------
      • Set Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Set LastHeroStanding = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Set PlayersCount = (Number of players in Players)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) is an ally of Player 1 (Red)) Equal to True
            • Then - Actions
              • Player - Set (Picked player) Current gold to (3692 / ((Number of players in (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))) - 1))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked player) is an ally of Player 5 (Yellow)) Equal to True
                • Then - Actions
                  • Player - Set (Picked player) Current gold to (3692 / ((Number of players in (All players matching ((((Matching player) is an ally of Player 5 (Yellow)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))) - 1))
                • Else - Actions
      • -------- PlayerRED --------
      • Set PlayerRED = (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))
      • Player Group - Remove Player 1 (Red) from PlayerRED
      • Set PlayerREDcount = (Number of players in PlayerRED)
      • Set PlayerREDReverse = (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))
      • Player Group - Remove Player 1 (Red) from PlayerREDReverse
      • Set PlayerREDplaying = (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))
      • Player Group - Remove Player 1 (Red) from PlayerREDplaying
      • -------- PlayerYELLOW --------
      • Set PlayerYELLOW = (All players matching ((((Matching player) is an ally of Player 5 (Yellow)) Equal to True) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))
      • Player Group - Remove Player 5 (Yellow) from PlayerYELLOW
      • Set PlayerYELLOWcount = (Number of players in PlayerYELLOW)
      • Set PlayerYELLOWReverse = (All players matching ((((Matching player) is an ally of Player 5 (Yellow)) Equal to True) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))
      • Player Group - Remove Player 5 (Yellow) from PlayerYELLOWReverse
      • Set PlayerYELLOWplaying = (All players matching ((((Matching player) is an ally of Player 5 (Yellow)) Equal to True) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))
      • Player Group - Remove Player 5 (Yellow) from PlayerYELLOWplaying
      • -------- General --------
      • Player - Turn Gives bounty On for Player 1 (Red)
      • Player - Turn Gives bounty On for Player 5 (Yellow)
      • Player - Turn Gives bounty On for Neutral Hostile
 
Level 6
Joined
Dec 31, 2017
Messages
138
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Owner of (Dying unit)) is in PlayerRED) Equal to True
              • ((Owner of (Killing unit)) is in PlayerYELLOW) Equal to True
              • And - All (Conditions) are true //wrong placement
                • Conditions
                  • ((Owner of (Killing unit)) is in PlayerRED) Equal to True
                  • ((Owner of (Dying unit)) is in PlayerYELLOW) Equal to True
Fix:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Owner of (Dying unit)) is in PlayerRED) Equal to True
              • ((Owner of (Killing unit)) is in PlayerYELLOW) Equal to True
          • And - All (Conditions) are true
            • Conditions
              • ((Owner of (Killing unit)) is in PlayerRED) Equal to True
              • ((Owner of (Dying unit)) is in PlayerYELLOW) Equal to True
 
Level 4
Joined
Jan 27, 2020
Messages
51
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Owner of (Dying unit)) is in PlayerRED) Equal to True
              • ((Owner of (Killing unit)) is in PlayerYELLOW) Equal to True
              • And - All (Conditions) are true //wrong placement
                • Conditions
                  • ((Owner of (Killing unit)) is in PlayerRED) Equal to True
                  • ((Owner of (Dying unit)) is in PlayerYELLOW) Equal to True
Fix:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Owner of (Dying unit)) is in PlayerRED) Equal to True
              • ((Owner of (Killing unit)) is in PlayerYELLOW) Equal to True
          • And - All (Conditions) are true
            • Conditions
              • ((Owner of (Killing unit)) is in PlayerRED) Equal to True
              • ((Owner of (Dying unit)) is in PlayerYELLOW) Equal to True
Thanks youu
 
Status
Not open for further replies.
Top