• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Some problems with the triggers.

Status
Not open for further replies.
Level 9
Joined
Dec 22, 2008
Messages
490
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?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
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

  • ((Unit-type of (Attacking unit)) Equal to |cffff8000Minion of the Seas|r)
this on the last condition should be Triggering unit, shouldn't it ?

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?

unfortunately, you need to do that if you want to vary the exp they gain. because structures don't have level.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
TwoVenomous
Attacking Unit is not equal to Triggering Unit
Attacked unit does

Also,you dont have to put Do Nothing action

  • ((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.
 
Status
Not open for further replies.
Top