Well, if you want to add a ranged attack to a unit/hero. Go to object editor and find your unit.
Then on the 'Combat' stats it has all the attack 1 stats, then it has attack 2 stats.. fill in the information you want on that, make the range higher than melee and change targets so it can target air (if you want) and put in a projectile model. e.g an arrow. then just below all the combat stats it has 'combat - attack enabled' or something like that. Make sure it's "both" if you want both attack 1 and attack 2. If you want an example look at the beastmaster hero