BlackbirdSD 15 Posted December 12, 2019 Id like to get a radio or written message when my friendly AI units get killed that are not in my group. Thanks Share this post Link to post Share on other sites
RCA3 581 Posted December 12, 2019 Create file on mission root named -> initPlayerLocal.sqf Paste this in: Quote { if (side _x == side player) then{ _x addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; //Report man down [_unit] spawn{ params ["_unit"]; sleep (2 + (random 8)); if (leader (group _unit) != _unit) then{ if (alive leader (group _unit)) then{ leader (group _unit) sideChat "Man down!"; }; }else{ if (count units group _unit > 1) then{ (units group _unit) select 1 sideChat "Man down! Lead is down!"; }; }; }; } ]; }; }forEach allunits; 1 Share this post Link to post Share on other sites
BlackbirdSD 15 Posted December 14, 2019 Will that announce the name of the ai or just that a team mate is killed? I pasted it in but saw no effect when I killed my own ai to test. Share this post Link to post Share on other sites
RCA3 581 Posted December 14, 2019 (edited) 13 hours ago, BlackbirdSD said: Will that announce the name of the ai or just that a team mate is killed? I pasted it in but saw no effect when I killed my own ai to test. You get the group name/callsign on the chat text, and then just the phrase "Man down!". You need someone alive to report man down or you'll get no message. Edited December 14, 2019 by RCA3 Share this post Link to post Share on other sites
BlackbirdSD 15 Posted December 15, 2019 All I get is cease fire while shooting at them. I had another ai standing right beside and no announcement that I killed the guy. I didn't edit your script at all just copy and pasted it in. Share this post Link to post Share on other sites
RCA3 581 Posted December 15, 2019 On 12/12/2019 at 11:11 PM, BlackbirdSD said: that are not in my group. Are they on your group? Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted December 15, 2019 Hello here Guys ! Here is something simple : addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if(isNull _instigator)then{_instigator = UAVControl vehicle _killer select 0}; // UAV/UGV player operated road kill if(isNull _instigator)then{_instigator = _killer}; // player driven vehicle road kill diag_log format ["________________ Killed : %1 Killer : %2 ________________",_killed,_killer]; if!((side group _killed) isEqualto playerside)exitwith{systemChat "!playerside";}; _systemChat_notification = true; // Show systemChat notification _sideChat_notification = true; // Show sideChat notification _side_of_sideChat = playerside; // https://community.bistudio.com/wiki/Side or ex: west _identity_of_sideChat = "HQ"; // https://community.bistudio.com/wiki/sideChat if (_systemChat_notification) then { [format["%1 K . I . A .", _killed]] remoteExec ["systemChat", 0, true]; }; if (_sideChat_notification) then { [[_side_of_sideChat,_identity_of_sideChat],format["%1 K . I . A .", _killed]]remoteExec ["sideChat", 0, true]; }; }]; there is more stuff to check in the : 1 Share this post Link to post Share on other sites
BlackbirdSD 15 Posted December 16, 2019 On 12/14/2019 at 8:32 PM, RCA3 said: Are they on your group? No Share this post Link to post Share on other sites
RCA3 581 Posted December 16, 2019 1 hour ago, BlackbirdSD said: No As i said, you need someone alive (on dead guy's group) to report man down or you'll get no message. It works for me. Try George's option too. 1 Share this post Link to post Share on other sites
BlackbirdSD 15 Posted December 16, 2019 George's worked for me. Thanks to both of you. 1 Share this post Link to post Share on other sites