• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger issue.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
  • Death and bounty
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Player Group - Add Player 11 (Dark Green) to Vampires
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Attacking unit)) is in Vampires) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: yes
          • If ((Unit-type of (Triggering unit)) Equal to House) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 1)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Tent) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 1)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Command Center) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 250)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Deforestation House) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 40)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Lumber House) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 10)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Amethyst Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 5)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Base of O|cffffcc00p|rerations) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 1000)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Carnelian Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 1)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Chrysoprase Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 75)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Diamond Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 250)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Emerald Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 50)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Garnet Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 100)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Ruby Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 150)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Sapphire Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 25)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Super Wall of Health) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 15)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Topaz Wall) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 2)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Wall of Health) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 5)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Gold Mine) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 20)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Super Gold Mine) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 40)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Comet Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 250)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Lightning Oracle) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 500)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Ultra Lightning Oracle) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 1000)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Citadel of Faith) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 120)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Slayer's Vault) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 5)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Calcite Outpost) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 15)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Orange Calcite Outpost) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 30)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Opal Spire) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 3)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Pink Diamond Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 15)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Upgraded Pink Diamond Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 30)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Shiny Pearl Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 2)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Tower of Pearls) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 1)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Advanced Research Center) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 10)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Human Vault) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 3)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Research Center) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 3)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Wall of Seeing) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 5)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Venom Spire) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 25)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Mana Energy Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 3)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Super Wall Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 20)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Wall Tower) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 10)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Tower of Flame) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 15)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Super Tower of Flame) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 35)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Ultimate Tower of Flames) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 55)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Feeding Block (1)) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 10)) else do (Do nothing)
          • If ((Unit-type of (Triggering unit)) Equal to Blood Box) then do (Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + 250)) else do (Do nothing)
        • Else - Actions
So even though the owner of attacking unit is in the player group Vampires, the actions do not fire and there is no message. I'm not sure why?

Owner of attacking unit should be the player right?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Owner of attacking is not correct in this context. The event is "A unit dies", so no attack is involved. The two functions you can use are Dying unit (you can also use triggering unit for that) and Killing unit (probably what you were looking for).
 
Status
Not open for further replies.
Top