• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Multi Kill

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2007
Messages
189
I have been working on a multi kill system for a while but have had no succsess. I have searched all over for a while and I havn't found anything that works. Can anyone help or at least get me startedd? Thanks:smile:
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Well then... (uses int array PlayerMKKils, timer array MultiKillTimeout)

  • MultiKill Add Kill
    • Events
      • Unit - A Unit Dies
    • Conditions
    • Actions
      • Set PlayerMKKills[Player Number of (Owner of (Killing Unit))] = PlayerMKKills[Player Number of (Owner of (Killing Unit))] + 1
      • If (All Conditions are True) Then do (Then Actions) Else do (Else Actions)
        • If - Conditions
          • PlayerMKKills[Player Number of (Owner of (Killing Unit))] Equal to 2
        • Then - Actions
          • Game - Display to (All Players) the text (Player Name of (Owner of (Killing Unit))) + ' has a double kill!'
        • Else - Actions
          • If (All Conditions are True) Then do (Then actions) Else do (Else actions)
            • If - Conditions
              • PlayerMKKills[Player Number of (Owner of (Killing Unit))] Equal to 3
            • Then - Actions
              • -------- And so on, and so forth --------
            • Else - Actions
              • -------- And so on, and so forth
      • Countdown Timer - Start MultiKillTimeout[Player Number of (Owner of (Killing Unit))] as a One-shot timer expiring in <max time between kills> seconds
  • MultiKill Expire
    • Events
      • Time - MultiKillTimeout[1] Expires
      • Time - MultiKillTimeout[2] Expires
      • -------- and so on, and so forth --------
    • Conditions
    • Actions
      • For Each Integer A from 1 to 12, do actions
        • Loop - Actions
          • If (All Conditions are True) Then do (Then actions) Else do (Else actions)
            • If - Conditions
              • (Expired Timer) Equal to (MultiKillTimeout[(For Loop Integer A)])
            • Then - Actions
              • Set PlayerMKKills[(For Loop Integer A)] = 0
            • Else - Actions
 
Level 6
Joined
Jan 2, 2007
Messages
189
Looks like it will work but I have one question. Wouldn't every time you kill a Hero the Multi_Kill_Timer would restart? And where is the condition: (Expired Timer) Eual to (MultiKIllTimeout(For Loop Integer A)))???
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
Oh, the condition? I was writing that without the WE and I was worried there may not be a Timer Comparison -.-

Meh, custom script tags saves the day! (just use this as the second trigger, in that case)

  • MultiKill Expire
    • Events
      • Time - MultiKillTimeout[1] Expires
      • Time - MultiKillTimeout[2] Expires
      • -------- and so on, and so forth --------
    • Conditions
    • Actions
      • For Each Integer A from 1 to 12, do actions
        • Loop - Actions
          • Custom script: if GetExpiredTimer() == udg_MultiKillTimeout[bj_forLoopAIndex] then
          • Set PlayerMKKills[(For Loop Integer A)] = 0
          • Custom script: endif
 
Status
Not open for further replies.
Top