That's precisely what I'm looking for. Any unit from any group, detecting any unit from any other group. That's pretty much what I need.
What about using
nearestObject command? Assuming we are talking about groups which belong to same side (e.g. Russian), you may want to write "detect_body.sqs" script like this:
_deadBody = _this
_aliveUnit = nearestObject [_deadBody, "SoldierEB"]
@not bodyFound
@not (alive _deadBody)
@_aliveUnit distance _deadBody < 15
? getpos _deadBody select 2 < -0.1 : exit
~3
? not (alive _aliveUnit) : exit
bodyFound = true
titleText ["BODY FOUND!", "plain down"]
exit
You exec this script by making a trigger as large as you want and activated by russians and by putting the following line in the init field:
{_x exec "detect_body.sqs"} forEach thisList
This script checks if any alive unit, who belongs to same side and is nearby dead body, can raise alarm when detecting dead body. Player is given 3 seconds to kill alive unit before it raises alarm and, once alive unit finds dead body (and alarm is raised), "bodyFound" condition will switch "true" and it prevents any other alive units to raise alarm when seeing any other dead body.
The only negative note is that this trick works only for standard soldiers (the one who refers to "SoldierEB" class if you understand what i mean...). You can work around this limit by replacing standard weapon with SVD, PK etc. instead of putting russian sniper unit, russian machine gunner unit etc.
I put new attachment with a group of russian soldier coming to church (we call it Alpha group). If you kill soldiers who patrols the church before the Alpha group get closer to them, Alpha group will detect any dead body it can find. And of course you can make Bravo group running to church and detecting dead body as well as Charlie, Delta, Echo etc. groups; if you want also to make Alpha, Bravo, Charlie, Delta etc. group members detectable when they become dead bodies, you just need to increase the trigger's size!
If we talk about NATO groups, just change "SoldierEB" in "SoldierWB".
If we talk about RESISTANCE groups just change "SoldierEB" in "SoldierGB".
I hope now this is what you were looking for, pal!