• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Thorn aura for ranged units

Status
Not open for further replies.
Level 2
Joined
Mar 27, 2008
Messages
24
Thorn aura for ranged units, trigger upon kill

These are my trigger:
  • Turn HL on
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Holy Lighting Holy Knight
    • Actions
      • Set lvl_HL_HK = (Level of Holy Lighting Holy Knight for (Triggering unit))
      • Trigger - Turn on Holy Lighting <gen>
      • Trigger - Turn off (This trigger)
  • Holy Lighting
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is A Hero) Equal to True
      • (Unit-type of (Attacked unit)) Equal to Garithos the Holy Knight
    • Actions
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (20.00 x (Real(lvl_HL_HK))) damage of attack type Chaos and damage type Normal
i dont know y the trigger NOT work with ranged units. :razz:

Another skill i need help :sad:
  • Turn Yeo on
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Experience
    • Actions
      • Trigger - Turn on Yeo <gen>
      • Trigger - Turn off (This trigger)


  • Yeo
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Killing unit)) Equal to Yeo
    • Actions
      • Set count_kill = (count_kill + (Real(((4 / 100) x (Level of Experience for (Killing unit))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • count_kill Greater than or equal to 1.00
        • Then - Actions
          • Hero - Modify Agility of (Killing unit): Add 1
          • Set count_kill = (count_kill - 1.00)
        • Else - Actions
Can someone help me solve this :confused:
 
Last edited:
Level 2
Joined
Mar 27, 2008
Messages
24
There is a difference between Attacking unit and Attacked unit, that's probably why your trigger doesn't work

By the way, you don't need to have two conditions in there
"(Unit-type of (Killing unit)) Equal to Yeo" is enough

Whats the difference?:razz: , i do not understand that :zip:
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
Attacking unit means the unit that is attacking and Attacked unit refers to the unit that is being attacked. Also, like I said in my thread, try creating a dummy unit at the position of the attacking unit and make the dummy unit damage the attacking unit.

For more info on the difference between Attacking Unit and Attacked Unit, I will explain.
Lets say I have a footman, and the footman starts to attack an archer. In this case, the attacking unit is the footman because it is doing the attacking while te archer is the attacked unit because it is the target of the attack.
 
Status
Not open for further replies.
Top