• 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] Killing and Dying triggers ....

Status
Not open for further replies.
Level 3
Joined
Apr 20, 2013
Messages
36
well Hi again .....

requesting a trigger for something like this :

when Hero (A) kills Hero (B) in game :

1.respawn Hero (B) in a random point at map
2.add a kill point and some golds to Hero (A)
3.add a Death point to Hero (B)
4.Show a message to Hero (A) that he killed Hero (B)
5.Show a message to Hero (B) that he Killed by Hero (A)
6.Show a message to other players that Hero (A) killed Hero (B)

what trigger i must make ??
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Either way, just create a multiboard to where the values are to be placed, the create this trigger:
  • Hero Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Hero[1] = (Killing unit)
      • Set Hero[2] = (Triggering unit)
      • Set Kills = (Kills + 1)
      • Set Deaths = (Deaths + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of Hero[1]) Equal to Player 1 (Red)
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 2, row 2 to (String(Kills))
          • Player - Add 1000 to Player 1 (Red) Current gold
          • Game - Display to Player Group - Player 1 (Red) the text: ((Proper name of Hero[1]) + ( has killed + ((Proper name of Hero[2]) + !)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of Hero[1]) Equal to Player 2 (Blue)
            • Then - Actions
              • Multiboard - Set the text for Multiboard item in column 2, row 3 to (String(Kills))
              • Player - Add 1000 to Player 2 (Blue) Current gold
              • Game - Display to Player Group - Player 2 (Blue) the text: ((Proper name of Hero[1]) + ( has killed + ((Proper name of Hero[2]) + !)))
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of Hero[2]) Equal to Player 1 (Red)
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 3, row 2 to (String(Deaths))
          • Game - Display to Player Group - Player 1 (Red) the text: ((Proper name of Hero[2]) + ( has been killed by: + ((Proper name of Hero[1]) + !)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of Hero[2]) Equal to Player 2 (Blue)
            • Then - Actions
              • Multiboard - Set the text for Multiboard item in column 3, row 3 to (String(Deaths))
              • Game - Display to Player Group - Player 2 (Blue) the text: ((Proper name of Hero[2]) + ( has been killed by: + ((Proper name of Hero[1]) + !)))
            • Else - Actions
      • Game - Display to (All players) the text: ((Proper name of Hero[1]) + ( has killed + ((Proper name of Hero[2]) + !)))
      • Set TempPoint = (Random point in (Playable map area))
      • Hero - Instantly revive Hero[2] at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Look dude, some triggers are just very long. That's how it is. Since 7 players are in your map, then add another If-Then-Else condition after every "Else" in the kills and deaths part.

You can't really make it shorter because any attempt to do so will make it less unfiltered. You need the If-Then-Else to filter which players' heroes are killed and those that did kill.

Don't be a slack-ass. Making long triggers like these can be a good exercise.
 
Level 3
Joined
Apr 20, 2013
Messages
36
Look dude, some triggers are just very long. That's how it is. Since 7 players are in your map, then add another If-Then-Else condition after every "Else" in the kills and deaths part.

You can't really make it shorter because any attempt to do so will make it less unfiltered. You need the If-Then-Else to filter which players' heroes are killed and those that did kill.

Don't be a slack-ass. Making long triggers like these can be a good exercise.

Well you're right ......

but since this is my first map could you show me what exactly i must do ???

Explain everything i am a Newbie .....

And tnx a lot +rep
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Status
Not open for further replies.
Top