Player kills only for enemy not allys

Jeroen

New Member
Reaction score
0
if i kill a enemy summon then i get a food (Killing Summons) but if i kill an ally then i also get a food (Killing Summons) how to fix that?

Trigger:
  • Player Kills
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • ((Triggering unit) is Not an Ally) Equal to True <- this is where i need help
        • Then - Actions
          • Player - Add 1 to (Owner of (Killing unit)) Current lumber
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is Summoned) Equal to True
          • ((Triggering unit) is Not an Ally) Equal to True <- this is where i need help
          • Then - Actions
            • Player - Add 1 to (Owner of (Killing unit)) Food used
          • Else - Actions
 

sentrywiz

New Member
Reaction score
25
The second line:

Trigger:
  • ((Triggering unit) is Not an Ally) Equal to True <- this is where i need help


Change that line with this:

Trigger:
  • ((Dying unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True


You may wanna change that instead of saying not ally, use enemy of.

And to avoid confussion and test your map, use Dying and Killing unit instead of Triggering unit.

Lemme know if this is it
 

sentrywiz

New Member
Reaction score
25
Triggering Unit is same with almost every type of something unit. Just saying, test your map with killing and dying unit.
 

Jeroen

New Member
Reaction score
0
bin a long to time working on it but i found the right way

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Then - Actions
      • If (((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True) then do (Player - Add 1 to (Owner of (Killing unit)) Current lumber) else do (Do nothing)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Triggering unit) is Summoned) Equal to True
      • Then - Actions
        • If (((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True) then do (Player - Add 1 to (Owner of (Killing unit)) Food used) else do (Do nothing)
      • Else - Actions
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top