Warcraft III resources & community, 2003–2006 · archived

Target of used item?

4 posts
#1

Target of used item?

How do I refer to a unit that has been targetted by a hero with an item?
#2
Events
Unit - A unit is attacked
Conditions
((Attacking unit) is A Hero) Equal to True
((Attacking unit) has an item of type ######) Equal to True

###### is your items type name.
That should explain what you are after.
Now uses | attacked unit | to refer to the unit that is under attack by the hero.

Warning If hero has area effect + that item ît may causes the game to crash attack if it's attack is not targeting a unit directly! (attacking ground)
#3
Assuming you want what you mentioned in your thread title, Dr Super Good's method is not accurate.

Using an item is largely just like having whatever ability the item has on the hero that's using it. Therefore, make a trigger that detects when your item ability is used, as long as it's separate from any unit abilities.
#4
Well the problem with that is I still need to be able to detect what item is used.

But whatever. I found a way around it. Thanks anyway. :)