Greetings,
I have done an extensive search on the internet for a script or command to call to "addRating" to the player when enemy AI are killed, however all I can find is the addScore ability when it comes to scripting. The forum posts I found are only related to a specific EOS module, I'm looking to give rating on ALL enemy AI. I am using both EOS and ALiVE to ambiently spawn in AI.
Any help would be appreciated, thanks.
tldr;
Give player rating from killing AMBIENTLY SPAWNED IN AI (ALiVE / EOS)
There is no difficulty, overriding what the engine scores: https://community.bistudio.com/wiki/ArmA:_Rating_Values Just for info because BI documentation is not updated.
You can use the MP event handler MPkilled. As any killed is civilian, you need to check the side of the victim before he dies:
{_x setVariable ["oldSide",side _x]} forEach allUnits; // in a loop if you spawn units.
then, for example:
player addMPEventHandler ["MPkilled", {
params ["_victim","_killer"];
if (!isplayer _killer or _victim == _killer) exitWith {};
if (_victim getVariable "oldSide" == west) exitWith {
[_killer,{_this addRating -3000}] remoteExec ["call",_killer];
parseText "<t color = '#ff9900'>You just killed a friendly unit!<br/>Cease blue on blue.<t/>" remoteExec ["hintsilent",_killer];
};
if (_victim getVariable "oldSide" == civilian) exitWith {
[_killer,{_this addRating -1000}] remoteExec ["call",_killer];
parseText "<t color = '#ffff00'>You just killed an innocent!<br/>Cease firing at unarmed civilians.<t/>" remoteExec ["hintsilent",_killer];
};
}];