So, to clarify, if I hit an enemy with the spotter attribute, does that mean that all snipers can now shoot at my soldier regardless of any other circumstances?
Yep. That and getting seen by a spotter right from the start are the two big things that make enemy snipers a pain.
Well, they do get the 50% accuracy penalty (I don't think anyone fields PSG-1's against X-Com?) to actually hit your agents, but since the enemies usually greatly outnumber you, some bullets will eventually find their mark.
But if an enemy just dies, this does not enable enemy sniping (just that they might move towards my location)?
Well, you could get hit by mind control as well due to being just 'seen'. And AI movement is not really terribly predictable, but they do drop out of their 'patrol' behaviour when they know you're there.
Is my soldier who hit the enemy the only one who can be seen, or are all of my soldiers now seen?
Only the one who hit them. And it needs to be a 'projectile', which leads to the tactics used by some veterans and recommended in the above post: grenades do not count as 'projectiles', have long range and much better accuracy than starter firearms.
So, you may get 'seen' because you killed them, but you don't get 'spotted' for snipers.
If I shoot at the enemy but don't hit them, does this trigger the spotter/sniper mechanic in any way?
Nope. Near misses with explosive ammo, like Light/Heavy Cannons, also do not count if they're just in the explosive radius, but the projectile itself doesn't hit them. It's kinda hard to almost-hit enemies, though.
Are there any other circumstances under which an enemy can snipe me, aside from hitting an enemy?
You've been seen by a spotter. Or you're playing BOXCE.
There's also enemies with night vision and infravision, which
might seem like sniping occasionally. But since most enemies don't have nearly as much NV as sniper-spotter provides, that's largely moot.
I'd attach a save, but I didn't save the actual start of the battle and loading from the Geoscape seems to be giving me an entirely different seed.
Autosave?
But if you encounter such a situation again and want to discuss it in detail, do remember to make a save.
I wasn't using any lighting and all of my guys were using kevlar vests. So I guess it will always be a mystery why the gangers seemed to be shooting at me from beyond visual range.
Are you sure it was actually the Gangers? With it being dark and all?
Otherwise, yeah, don't really know what might have been going on.
...is there any easy way to get them in the meantime, other than sheer luck? I've tried melee, too, but it seems to be an even worse idea than shooting the enemy.
Don't melee, run up to them and stay put, hoping you beat them in CQC. Or at least reserve some energy for the attempts. Dogs are pretty amazing for that, and cheaper than agents.