1. Place two units in the editor (e.g. rifleman)
2. Add the following to the init field of the non-player unit.
this addEventHandler ["handledamage", "if (isNull (_this select 3)) then { player globalchat (str _this); }; (_this select 2)"];
3. Preview mission and shoot the unit in the head.
Notice that the shooter/source parameter is null.