Fight vs. Flight
I'm all for vacating the area if someone starts shooting. It's the prudent thing to do, especially if you are with friends and family members. Given a safe opportunity to get out of the kill zone, I'll take it. Heck, if I judge the odds are on my side, I might even take a "risky" chance to get out of the kill zone. They can't kill you if you ain't there to be kilt.
Otherwise you seek cover - or at least concealment - from the shooter(s). Cover provides protection from bullets while concealment merely shields you from view.
The next question, when you are armed, is do you engage the shooter from cover? That will depend on a myriad of factors. Those factors will include the "quality" of your cover, distance to the shooter, the gun & ammo you're using, whether the shooter is facing you, advancing on your position or walking in another direction, the weapon(s) he's using, the number of people moving around, etc, etc.
I wouldn't advocate engaging a rifle-armed shooter at 70 yards who is wearing body armor or a long trench coat when you're armed with a snubby .38 or a pocket pistol. Probably not even a .45 or .44.
A shooter firing in your direction means you should be behind cover, not poking your head up to watch him like a Prairie dog. You should be evaluating where the next nearest cover is and coming up with a plan to extricate yourself from the kill zone.
I think most people imagine themselves finding cover then eventually seeing the shooter from their concealed position. If the shooter is facing away or his attention is elsewhere, you may have a chance for a well aimed shot if he is within your effective range.
BillCA in CA (Unfortunately)