There are quite a few issues with how fired projectiles and damage they cause are treated in Arma. It seems it hasn’t changed much during years. Up until Arma 2 OA in order to detect fired projectile one needed to search for the nearestObject of known type (type obtained from “Fired” EH) around the player. Considering nearestObject is pretty expensive, executing it for every fired shot would be very expensive. So in OA “Fired” EH also returned projectile object.

Now this is where is gets tricky. There are 2 kinds of projectiles in Arma, local and global. A bullet, for example, is very small and fast, it would not make sense to create it on one PC and broadcast it globally, as it would kill the bandwidth pretty quickly with the amount of bullets flying on a busy server. So instead, bullet is created on every PC with the same staring params, so theoretically it should behave identically on every PC. Theoretically. In practice it is not like this at all.

I have made some experiments, shooting bullets and tracking them on server and client, and there is a difference and not a small one. For example a bullet on client may hit something and disappear, while server bullet would still be flying. This is probably the reason hit detection is also client side in Arma. All hits are processed where bullet is originated. So say a cheater removed a wall between him and you locally and shoots at you, you are dead even if on your PC you still have the wall.

This was quite a problem until quite recently when you could move static objects around, not any more. But still, this shows that Arma probably was never designed with proper MP in mind. Massive coop against AIs is probably the pinnacle of its MP suitableness.

Global projectiles are slower and bigger projectiles that can be synced across network, such as missiles, hand and underbarrel grenades, etc. What happens with these is that when player fires one of those, it only fired on one PC. Because of this the actual object of the projectile is available on one PC that fired it, so “Fired” EH returns <object-NULL> on all other PCs. Even though this was requested million times and there are tickets on feedback tracker about it, I will go on a limb here and say, it will never be fixed. Why? Because the original system designed to handle projectiles needs to be redesigned from ground up. Not happening. Not in Arma 3 anyway.

Same goes for the ownership of the projectile. When you fire your rifle, it is all nice and cool, “all your bullet are belong to you”. But when you fire vehicle weapon, the vehicle owns the projectile not the shooter. And whoever owns the vehicle owns the projectile, usually the driver. Oh yes, annoying as fuck with consequences. But again, same old same old projectile handling system. The workarounds are horrendous, especially considering you can set neither variable nor event handler on a projectile. But for killing a few dumb AIs with a bunch of friends I guess it works fine.

Right, the workaround to the global projectile issue. I’m afraid it is back to the stone age, detecting it with nearestObject:

_player addEventHandler ["Fired", { params [ "_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile" ]; if (isNull _projectile) then { _projectile = nearestObject [_unit, _ammo]; }; //rest of the code }];

Enjoy,
KK