Introduction
I have to admit that despite playing a Warlock who makes frequent use of his Eldritch Blast, I did not know the rules of using ranged attacks as well as I thought I did. Fortunately, Google brought me to this handy guide from Wizards. The page explains things like cover in detail, but I wanted to focus on ranged attacks and soft cover, better known other people since the party is continuing to grow.
Shooting into Melee
If you shoot into melee, you suffer a -4 penalty because you're trying to hit one person while taking extra care not to hit the other. Melee is defined as an enemy and an ally standing within five feet of one another, even if they are targeting other people. Firing at an enemy who only adjacent to other enemies does not result in a penalty, as you are not taking the same precautions you would with a friend in the way. However, this can be prevented with the feat Precise Shot. Interestingly enough, if an ally attacks with a reach weapon like a halberd from a distance, no penalty is in order.
Soft cover
Again, soft cover is a term for the people between you and the target, friend or foe. Simply put, your target gains 4 AC because you're trying to shoot around other people. If you have the feat Improved Precise Shot (found in the PHB, but requires more Base Attack than any of us will have for a while) you can ignore this penalty.





