Thanks, was an interesting read!
Long story short;
I'm working on a surrender scriptmod where if a surrendered unit is fired upon they will start fleeing.
I managed to solve my issue by using the EH HitPart for the projectile. The finished code looks like this:
// Check if a player fires at a surrendered or cowering unit
fnc_addPlayerFiredHandler = {
{
_player = _x;
if (isNil {_player getVariable "logicAdded"}) then {
// On player fire event
_player addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
// Throttle fire event
if (!(_unit getVariable ["onCooldown", false])) then {
[_unit, 0.6] call fnc_addGeneralCooldown;
// On projectile hit event
_projectile addEventHandler ["HitPart", {
params ["_projectile", "_target", "_shooter", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"];
[_shooter, _position] spawn fnc_handleBulletImpact;
}];
};
}];
_player setVariable ["logicAdded", true];
};
} forEach PLAYERS;
};