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 Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    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,842
    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.