1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[General] Some problems with the triggers.

Discussion in 'World Editor Help Zone' started by Illidan_Hunter, Dec 26, 2012.

  1. Illidan_Hunter

    Illidan_Hunter

    Joined:
    Dec 22, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    Q1. I have some problems with the conditions for anti-teamkilling and they stand like that:

    • Teamkill Protection
      • Events
        • Unit - A unit Is attacked
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Unit-type of (Triggering unit)) Equal to |cfffaf7a5Murloc Tiderunner|r) or ((Unit-type of (Triggering unit)) Equal to |cff45c8f2Naga Siren|r)
            • ((Unit-type of (Attacking unit)) Equal to |cffff8000Ancient Titan of the Seas|r) or ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)
          • Then - Actions
            • Do nothing
          • Else - Actions
            • Unit - Order (Attacking unit) to Stop
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Unit-type of (Triggering unit)) Equal to |cffff8000Ancient Titan of the Seas|r) or ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)
            • ((Unit-type of (Attacking unit)) Equal to |cffff8000Ancient Titan of the Seas|r) or ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)
          • Then - Actions
            • Unit - Order (Attacking unit) to Stop
          • Else - Actions
            • Do nothing


    I wanted the Murloc Tiderunner and Naga Siren to be hit only by Titan or the Minion, so it is not killable by other builders or their towers, etc.

    In the second one I wanted the Titan or Minion not be able to kill each other.

    What did I do wrong?

    Q2. The second question is how to get experience for killing structures? I did enable that option in Gameplay Constants, but, unlike units, I cannot set a proper level for the buildings to show how much xp the killer recieves. Do I need to work this manually with triggers? Like, if building is destroyed, give 200xp to the attacking unit?
     
  2. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    • ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)

    this on the last condition should be Triggering unit, shouldn't it ?

    unfortunately, you need to do that if you want to vary the exp they gain. because structures don't have level.
     
  3. Illidan_Hunter

    Illidan_Hunter

    Joined:
    Dec 22, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    nevermind, i'll rework them

    thanks for the answer

    Can be closed.
     
  4. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    TwoVenomous
    Attacking Unit is not equal to Triggering Unit
    Attacked unit does

    Also,you dont have to put Do Nothing action
     
  5. TwoVenomous

    TwoVenomous

    Joined:
    Sep 11, 2011
    Messages:
    1,174
    Resources:
    1
    Skins:
    1
    Resources:
    1
    • ((Unit-type of (Triggering unit)) Equal to |cffff8000Ancient Titan of the Seas|r) or ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)
    • ((Unit-type of (Attacking unit)) Equal to |cffff8000Ancient Titan of the Seas|r) or ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)


    see the difference.
    the first one, the condition is 1. Triggering unit 2. Attacking unit
    the second one, the condition is 1. Attacking unit 2. Attacking unit

    that's why i said it should be Triggering unit instead of Attacking unit in the second condition of second one.
     
  6. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,768
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    You must use (Or-Any) Conditions are true.
    That way the ITE function checks for both things, not just one of them.

    (Triggering Unit) equals the unit that triggers the event of the trigger.