From 094791407bc43185ff7a3818cf00c647f93515aa Mon Sep 17 00:00:00 2001 From: Teh Dango Date: Tue, 15 Mar 2016 20:21:42 -0500 Subject: [PATCH] Feature Addition Added kill messages when an AI is killed. Also included a chance for AI to speak in system chat when killed. --- sarge/SAR_aihit.sqf | 4 ++-- sarge/SAR_aikilled.sqf | 18 +++++++++++------- sarge/SAR_setup_AI_patrol.sqf | 3 +++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/sarge/SAR_aihit.sqf b/sarge/SAR_aihit.sqf index 341ab4b..7eef5fe 100644 --- a/sarge/SAR_aihit.sqf +++ b/sarge/SAR_aihit.sqf @@ -49,11 +49,11 @@ if ((!isNull _aikiller) && {(_playerUID != "") && {_aikiller isKindOf "Exile_Uni if ((random 100) > 5) then { _message = format["Sarge AI: Dammit %1! You are firing on a friendly group check your fire!",_aikiller_name]; - if (isServer) then {systemchat _message;}; + _message remoteExec ["systemeChat",0]; } else { if ((random 100) < 5) then { _message = format["Sarge AI: %1, this was the last time you shot one of our team! We are coming for you!",_aikiller_name]; - if (isServer) then {systemchat _message;}; + _message remoteExec ["systemeChat",0]; }; }; diff --git a/sarge/SAR_aikilled.sqf b/sarge/SAR_aikilled.sqf index 942f52f..816f114 100644 --- a/sarge/SAR_aikilled.sqf +++ b/sarge/SAR_aikilled.sqf @@ -43,10 +43,8 @@ _ai_killer_type = _aikiller getVariable ["SAR_AI_type",""]; if (SAR_KILL_MSG) then { if(isPlayer _aikiller) then { _message = format["A %2 was killed by Player: %1",_aikiller_name,_ai_type]; - diag_log _message; - //[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE; - [[[West,"airbase"], _message],{(_this select 0) sideChat (_this select 1)}] call BIS_fnc_MP; + _message remoteExec ["systemeChat",0]; }; }; @@ -71,6 +69,9 @@ if ((!isNull _aikiller) && {(_playerUID != "") && {_aikiller isKindOf "Exile_Uni _playerRespect = _playerRespect - _repChange; _aikiller setVariable ["ExileScore",_playerRespect]; + _fragType = [[format ["%1 Kill",_ai_type],-_repChange]]; + [_aikiller, "showFragRequest", [_fragType]] call ExileServer_system_network_send_to; + ExileClientPlayerScore = _playerRespect; (owner _aikiller) publicVariableClient "ExileClientPlayerScore"; ExileClientPlayerScore = nil; @@ -84,12 +85,12 @@ if ((!isNull _aikiller) && {(_playerUID != "") && {_aikiller isKindOf "Exile_Uni if ((random 100) > 3) then { _message = format["%1 killed a friendly AI - sending reinforcements!",_aikiller_name]; //[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE; - [[[West,"airbase"], _message],sideChat] call BIS_fnc_MP; + _message remoteExec ["systemeChat",0]; } else { if ((random 100) < 3) then { _message = format["Tango down ... we offer a decent reward for the head of %1!",_aikiller_name]; //[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE; - [[[West,"airbase"], _message],sideChat] call BIS_fnc_MP; + _message remoteExec ["systemeChat",0]; }; }; }; @@ -105,6 +106,9 @@ if ((!isNull _aikiller) && {(_playerUID != "") && {_aikiller isKindOf "Exile_Uni _playerRespect = _playerRespect + _repChange; _aikiller setVariable ["ExileScore",_playerRespect]; + _fragType = [[format ["%1 Kill",_ai_type],_repChange]]; + [_aikiller, "showFragRequest", [_fragType]] call ExileServer_system_network_send_to; + ExileClientPlayerScore = _playerRespect; (owner _aikiller) publicVariableClient "ExileClientPlayerScore"; ExileClientPlayerScore = nil; @@ -119,12 +123,12 @@ if ((!isNull _aikiller) && {(_playerUID != "") && {_aikiller isKindOf "Exile_Uni if ((random 100) < 3) then { _message = format["nice bandit kill %1!",_aikiller_name]; //[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE; - //[_message,"(_this select 0) sideChat (_this select 1)",true,false] call BIS_fnc_MP; + _message remoteExec ["systemeChat",0]; } else { if ((random 100) < 3) then { _message = format["another bandit down ... %1 is going to be the root cause of bandit extinction :-)",_aikiller_name]; //[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE; - //[_message,"(_this select 0) sideChat (_this select 1)",true,false] call BIS_fnc_MP; + _message remoteExec ["systemeChat",0]; }; }; }; diff --git a/sarge/SAR_setup_AI_patrol.sqf b/sarge/SAR_setup_AI_patrol.sqf index d392c00..44d8cd5 100644 --- a/sarge/SAR_setup_AI_patrol.sqf +++ b/sarge/SAR_setup_AI_patrol.sqf @@ -175,6 +175,9 @@ if (_respawn) then { }; if !(SAR_AI_STEAL_VEHICLE) then { + _ups_para_list pushBack ['NOVEH']; +}; +if !(SAR_AI_COMBAT_VEHICLE) then { _ups_para_list pushBack ['NOVEH2']; };