Looking at the functions available, it seems like http://geck.gamesas.com/index.php/GetCombatTarget might work, but the GECK page doesn't say what kind of block to use it in, and also it only works if autoaim could work. That seems like a limitation. The GECK also has http://geck.gamesas.com/index.php/GetOwnerLastTarget but apparently that only works in a OnHit block, which itself can only be attached to a script running on a weapon? I'm confused. I also saw the FOSE function GetCrosshairRef but I'm not sure that would get the name of the NPC actually taking damage / dying. Depending on how erratically the PC is moving, he could do damage to one NPC, then move the crosshair when the script fires so the wrong name would be returned.
Separately, I'm looking for how to determine what body parts of an NPC / creature are hit by a given bullet, if they're crippled or not, and how to check if the PC's different body parts have been hit/crippled. Using a combination of http://geck.gamesas.com/index.php/GetHitLocation and http://geck.gamesas.com/index.php/GetLastHitCritical seemed natural, but I read on the GetHitLocation page that
GetHitLocation will only return the correct value in a GameMode block in the frame that the reference is killed.
To me, that says I can only find out if the PC is hit on the, say, arm if the PC is killed by that hit (useless), and I can't determine where any other creature / NPC is hit unless it's the killing blow. But the biggest problem with using these two functions in tandem is that GetHitLocation wants to run in the GameMode block but GetLastHitCritical's page says it only works in the OnHit block. If I'm working in the OnHit block, it seems like using http://geck.gamesas.com/index.php/GetOwnerLastTarget would make more sense, except there is no information on the page for that function!
Sorry for the wall of text, it highlights how confused I am by trying to solve these problems.