This is a little tricky, and so far, I have found no way to do it with the standard triggers of the World Editor (did I mention that I am awful at JASS).I know that it is possible though (as it happens in Custom Hero Arena when you pick up an orb of range), it's just a matter of implementing it. If you could tell me how to do it, or supply me with the JASS script, that would be great.
I was also wondering if someone could tell me how I can make an event that runs when a unit does an individual attack. Not when the unit is sent to attack the enemy unit, but when it does an individual attack.
For the first one, I would just say you that in custom hero, the orb of range just make you ranged when you attack air so I wonder if that's what you want to do, If it's well u just have to modify the item and target you click on air. But if you want just with a command or when he goes somewhere just tell me because I dont want to write it all if u dont need.
Well for your second, what you have to do is triggering the unit that being atked and not the attacker.
The event is: Unit - Player-owned unit event
And then u can change who the unit belong to and what happen to him.
So u could end with something like this Events Unit - A unit owned by Neutral Passive is attacked
conditions None
Actions (Well I think that what you want to do) Unit - change ownership of (triggering unit) to Neutral Hostile and Retain color
You can change that to the unit attacked belong to a player and you can change that when he's attacked he change to a player too.