• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

triple kill

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Kill_Hash = (Last created hashtable)
  • Untitled Trigger 018
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Kill_Hash
      • Set integer = (Load (Key kills) of (Key (Killing unit)) from Kill_Hash)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • integer Equal to 2
        • Then - Actions
          • -------- TRIPLE KILL --------
        • Else - Actions
      • Hashtable - Save (integer + 1) as (Key kills) of (Key (Killing unit)) in Kill_Hash
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Alternatively, you could have a timer that is set to expire in 5 seconds if a hero kill another hero, but is reset to 5 seconds again another hero is killed, while adding +1 to an integer variable. When the timer ran out, you would check the value of the integer variable.
This way, however, is incredibly complex in GUI (Triggers), and would probably not be worth it in the long run.

P.S. -- «How to» threads go on the World Editor Help Zone.
~Thread moved
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
There.


  • Untitled Trigger 018
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hashtable
      • Set integer = (Load (Key kills) of (Key (Killing unit)) from Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • integer Equal to 2
          • ((Killing unit) is in Killer_Group) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: TRIPLE KILL
        • Else - Actions
      • Hashtable - Save 5 as (Key timer) of (Key (Killing unit)) in Hashtable
      • Unit Group - Add (Killing unit) to Killer_Group
      • Hashtable - Save (integer + 1) as (Key kills) of (Key (Killing unit)) in Hashtable
      • Trigger - Turn on Timer Trig <gen>

  • Timer Trig
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Killer_Group and do (Actions)
        • Loop - Actions
          • Set integer = (Load (Key timer) of (Key (Picked unit)) from Hashtable)
          • Game - Display to (All players) the text: (String(integer))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • integer Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Killer_Group
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Killer_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Hashtable - Save (integer - 1) as (Key timer) of (Key (Picked unit)) in Hashtable

 

Attachments

  • asdasd.w3x
    31.7 KB · Views: 73
Level 7
Joined
Dec 24, 2009
Messages
257
Well you can use this trigger
  • Events
    • Unit - When an unit dies
  • Conditions
    • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
  • Actions
    • If (All conditions are true) then do (Then Actions) else do (Else Actions)
      • If - Condition
        • (Remaining time for (Triple_Kill) Greater than 0.00
      • Then - Actions
        • Game - Display to (All players) the text : (Blahblahblah Triple Kill! Blahblahblah)
        • Countdown Timer - Start (Triple_kill) as a One_shot timer that will expire in 5.00 seconds
      • Else - Actions
        • If (all conditions are true) then do (Then Action) else do (Else actions)
          • If - Conditions
            • ((Time remaining of (Double_Kill) Greater than 0.00
          • Then - Actions
            • Game - Display to (All players) the text : (Blahblahblah Double Kill! Blahblahblah)
            • Countdown Timer - Start (Triple_kill) as a One_shot timer that will expire in 5.00 seconds
          • Else - Actions
            • Countdown Timer - Start (Double_kill) as a One_shot timer that will expire in 5.00 seconds
 
Status
Not open for further replies.
Top