hero kills trigger errors

windale5

New Member
Reaction score
2
trigger error

Hi this is my trigger but I have multiple of these triggers. What i want is to have them occur in order. So if a hero die the unit or person that killed him gets the gold, but the error is all of these activate at once even when i change the kills P_N to (any # here). How would i fix this plz
Code:
First Blood Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set P_N = (Player number of (Owner of (Killing unit)))
        Set Kills[P_N] = (Kills[P_N] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        Kills[P_N] Equal to 3
            Then - Actions
                Player - Add 150 to (Owner of (Killing unit)) Current gold
                Sound - Play Double_Kill <gen>
                Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) +  has just been awarded 150 gold for his 2nd hero kill!)
                Trigger - Turn off (This trigger)
            Else - Actions
 

Carl-Fredrik

New Member
Reaction score
51
Hi this is my trigger but I have multiple of these triggers. What i want is to have them occur in order. So if a hero die the unit or person that killed him gets the gold, but the error is all of these activate at once even when i change the kills P_N to (any # here). How would i fix this plz
Code:
First Blood Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set P_N = (Player number of (Owner of (Killing unit)))
        Set Kills[P_N] = (Kills[P_N] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        Kills[P_N] Equal to 3
            Then - Actions
                Player - Add 150 to (Owner of (Killing unit)) Current gold
                Sound - Play Double_Kill <gen>
                Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) +  has just been awarded 150 gold for his 2nd hero kill!)
                Trigger - Turn off (This trigger)
            Else - Actions

How about turning on the "next" trigger in the end of this trigger? (And have all of them except for the first one turned off in the initilization)
 

Jack.K

New Member
Reaction score
1
Yes, Just start the map with all turned off but the first. Then at the end of each one turn the next trigger on.
 

windale5

New Member
Reaction score
2
nope

no it doesn't work. Still all of these turn on. Just think of it as Dota when u kill heroes and get gold in order thats what i need
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
I suggest you just have 1 trigger.

You want a "Double kill" "multi kill" "Ultrakill" trigger? Or just a first blood, second blood?...
Something like this?:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Killing unit)) controller) Equal to User
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to lastkiller
        • Then - Actions
          • Set blood = (blood + 1)
        • Else - Actions
          • Set blood = 1
          • Set lastkiller = (Owner of (Killing unit))
      • Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set gold = (255 + (blood x 55))
      • Player - Add gold to (Owner of (Killing unit)) Current gold
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • blood Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of lastkiller) + ( nailed + ((Name of (Owner of (Triggering unit))) + ( for an extra + ((String(gold)) + gold! DOUBLE!)))))
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • blood Equal to 3
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of lastkiller) + ( nailed + ((Name of (Owner of (Triggering unit))) + ( for an extra + ((String(gold)) + gold! TRIPPLE)))))
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • blood Greater than 3
        • Then - Actions
          • Set blood = 3
          • Game - Display to (All players) the text: ((Name of lastkiller) + ( nailed + ((Name of (Owner of (Triggering unit))) + ( for an extra + ((String(gold)) + gold! ULTRA!!)))))
          • Skip remaining actions
        • Else - Actions
      • Game - Display to (All players) the text: ((Name of lastkiller) + ( nailed + ((Name of (Owner of (Triggering unit))) + ( for an extra + ((String(gold)) + gold!)))))

Edit: You might also want to reset the "lastkiller"/blood variables after a time period? No? Ok...
 

Randor244

Ultra Cool Member
Reaction score
34
I just want it to say once whoever gets the kills first there is no second time.
So, if a hero dies, the player of the killing unit should get gold? Once?

Why don't keep it really simple then?


Code:
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Player - Add 150 to (Owner of (Killing unit)) Current gold
        Sound - Play Double_Kill <gen>
        Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) +  has just been awarded 150 gold for his 1st hero kill!)
        Trigger - Turn off (This trigger)
 

windale5

New Member
Reaction score
2
this is true but 1 problem

this is true but 1 problem. I'll explain here
1 hero dies it plays a sound
2nd hero die it plays a different sound
3rd hero sies plays another different sound
then it 5, 7 ,10 ,15th hero and all different sound its a matter who gets the kills first of the heroes.
 

windale5

New Member
Reaction score
2
killing message help

i need a trigger when someone kills a hero a message shows they killed the first hero. When they kill a second one it shows another msg, but if someone else kills a hero and another one the msg just displays once of whoever kills first. First come first serve.
Example: red kills green hero Msg displays.
Green kills red no msg displays
Green kills red hero again msg displays
Green kills red hero 3rd time msg displays
Red kills purple hero 3 time plus red hero which was before a msg display.
So it's a system that keeps track and shows msges of whoever kills hero from 1-15. ask if its complicked
 

millzy

Ultra Cool Member
Reaction score
44
so what are u saying u want a trigger that shows a messege if a hero kills a hero then kills another with out dieing a messege will show then if it kills another ect

but if it dies it starts all over again??
 

windale5

New Member
Reaction score
2
I have these triggers heroes # count and the problem is they all active at once. How do i make it so it keeps count because when i kill a hero they all active. It suppose to be 1 then after i kill another hero the other one activates.
Code:
First Blood
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
        ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
    Actions
        Set P_N = (Player number of (Owner of (Killing unit)))
        Set Kills[P_N] = (Kills[P_N] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Kills[P_N] Equal to 2
            Then - Actions
                Player - Add 150 to (Owner of (Killing unit)) Current gold
                Sound - Play firstblood <gen>
                Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) +  has just been awarded 150 gold for first hero kill!)
                Trigger - Turn off (This trigger)
            Else - Actions
Code:
First Blood Copy Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set P_N = (Player number of (Owner of (Killing unit)))
        Set Kills[P_N] = (Kills[P_N] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
                        Kills[P_N] Equal to 3
            Then - Actions
                Player - Add 150 to (Owner of (Killing unit)) Current gold
                Sound - Play Double_Kill <gen>
                Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) +  has just been awarded 150 gold for his 2nd hero kill!)
                Trigger - Turn off (This trigger)
            Else - Actions
Code:
First Blood Copy Copy Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set P_N = (Player number of (Owner of (Killing unit)))
        Set Kills[P_N] = (Kills[P_N] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
                        Kills[P_N] Equal to 4
            Then - Actions
                Player - Add 150 to (Owner of (Killing unit)) Current gold
                Sound - Play triple_kill <gen>
                Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) +  has just been awarded 150 gold for his 3rd hero kill!)
                Trigger - Turn off (This trigger)
            Else - Actions
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top