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