you have to choose! do you want a trigger or and item that affects the units attackbehavior. the trigger ist quiete simple:
A unit comes within "xxx" of "xxx" enable attack 1 for trigging unit
The item ability wil a copy from any orb, remember in real game heros get a range attack when carrying an orb. down in the abilityscript there is a small field index of activated attack. remember. your hero musst have a specified attack in his profile. take a look at the standard heros under attack 2 you'll find an ranged attack... the different missilearts are specified within the abilityscript under misslieart...
jesusfreaki need to make a spell or trigger that does these two things,
1) i need to make it so a unit can attack when he picks up a sword, and not be able to attck when he drops it
2) i need a trigger that says, if a unit enters with in 1000 of a generic unit x do action z, if you get my drift
@Master Modmaker: I think you mixed something up. He doesn't need a trigger that enables attack when a unit comes close to it. He wants one trigger that enables the attack when picking up the sword and a trigger that disables the attack when he drops the weapon.
Second trigger he only wants to know the event, what you answered totally correct.