Hi Nivraga
Re the Hide Body routine - I sometimes hide bodies just so they won't be around for looting any more. But your're right - against AI there seems little reason to do this . . . :'(
I too once wrote a script a bit like the one you mentioned. What you need to do is create a trigger with Anybody Present in the activation. You then make a "list" from that trigger and write your script so that each enemy unit will check each unit (friend or enemy) in the list.
If the target unit is both dead and very close then the unit's group becomes active. You change the group's waypoint into a "Search Destroy" (from say, a Sentry) and make everyone Combat or Stealth mode. That should do it.
Oh yeah, you may also want to put a little lag between the discovery and activation steps so that your friendly Black Op can kill him before he squeels. Something like -
<Body Detected, record _discoveryLoon>
playsound "Oh my God, what's this ?"
; or something similar ~10
If (_bodyDetected) and (alive_discoveryLoon) then <do all that activation stuff>
exit
You won't need the script any more now that the group is activated so that's why you can exit it. If you want to have multiple groups becoming active then you might want to have a public variable that lets the other groups (running their own version of the script) know that something's been discovered.
Again, you could put in a lag so that if you can wipe out the entire group in say, 30 seconds then the other groups aren't told. In this case you would check for alive _loonLeader instead of alive _discoveryDude.
Hope that this helps.
Roni