1. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  2. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  3. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  4. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

[Solved] First Blood Trigger

Discussion in 'World Editor Help Zone' started by GrandMaitre, May 1, 2019.

  1. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    337
    Resources:
    0
    Resources:
    0
    Hi, the problem is that :
    -If a teammate kills you he earns the 3k gold.
    -If you kill yourself with AOE spell you will earn the 3k gold
    How to avoid and fix this glitch?

    I tried to traslate the trigger ^^


    • Events
      • Unit - A unit Die
    • Conditions
      • ((Triggering unit) is a heros) Equal to TRUE
      • (Owner of (Killing unit)) DiffĂ©rent de Neutral Hostile
      • (Owner of (Killing unit)) DiffĂ©rent de Neutral Passif
      • ((Killing unit) is a heros) Equal to TRUE
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Si - Conditions
        • (Owner of (Killing unit)) Equal to (Owner of (Triggering unit))
      • Alors - Actions
        • Do nothing
      • Sinon - Actions
    • Player - Add 3000 to (Owner of (Killing unit)) Gold current
     
    Last edited: May 1, 2019
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Add an other boolean comparison, to check that (Owner of(Killing unit)) an an Enemy towards (Owner of(Dying unit unit)).
    You couold also add a check, if killing unit exists at all, with comparing it to "No unit".
     
  3. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    337
    Resources:
    0
    Resources:
    0
    How to make your condition since both team can be up to 6 players?
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    The amount of players is unrelated to the check. You pass 2 players to the function and check if they are enemies.

    • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True

    You can find it under boolean comparison -> Player - [ ... ]
     
  5. GrandMaitre

    GrandMaitre

    Joined:
    Feb 20, 2014
    Messages:
    337
    Resources:
    0
    Resources:
    0
    It works thanks a lot