mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
Update Humanity System
This updates the humanity system. It removes the OpenTarget from Dayz Mod which is not needed for Epoch and more confusing as it helps to understand why a player gets a humanity drop or not. The new system gives players always humanity. Survivor killed Survivor = Negative Humanity Survivor killed Bandit = Positive Humanity Survivor killed Hero = Negative Humanity Hero killed Bandit = Positive Humanity Hero killed Hero = Negative Humanity Hero killed Survivor = Negative Humanity Bandit killed Bandit = Negative Humanity Bandit killed Hero = Negative Humanity Bandit killed Survivor = Negative Humanity The values are strict and have no longer a complicated calculation based on a kill counter. This change needs more testing in the beta state of this update.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private["_body","_name","_method","_methodStr","_message","_killingBlow"];
|
||||
private["_body","_name","_method","_methodStr","_message","_killingBlow","_ConfirmedHumanKills","_ConfirmedBanditKills"];
|
||||
|
||||
_body = _this select 3;
|
||||
_name = _body getVariable["bodyName","unknown"];
|
||||
@@ -8,28 +8,28 @@ _killingBlow = _body getVariable ["KillingBlow",[objNull,false]];
|
||||
|
||||
/*
|
||||
Setup by player_death
|
||||
[Object,Punished];
|
||||
[Object,Punished];
|
||||
_killer = _killingBlow select 0; //Killer
|
||||
_Punished = _killingBlow select 1; //False = HumanKill, True = BanditKill
|
||||
*/
|
||||
|
||||
// "His/Her name was %1, it appears he/she died from %2"
|
||||
_message = if (_body isKindOf "SurvivorW2_DZ") then {"str_player_studybody_female"} else {"str_player_studybody"};
|
||||
_message = ["str_player_studybody","str_player_studybody_female"] select (_body isKindOf "SurvivorW2_DZ");
|
||||
|
||||
format[localize _message,_name,_methodStr] call dayz_rollingMessages;
|
||||
|
||||
//Body hasnt already been Studied lets set the confimed Kills system.
|
||||
if !(_body getVariable ["BodyStudied",false]) then {
|
||||
if (!isNull (_killingBlow select 0)) then {
|
||||
if (!(_killingBlow select 1)) then {
|
||||
if (_killingBlow select 1) then {
|
||||
_ConfirmedHumanKills = (_killingBlow select 0) getVariable ["ConfirmedHumanKills",0];
|
||||
(_killingBlow select 0) setVariable ["ConfirmedHumanKills",(_ConfirmedHumanKills + 1),true];
|
||||
} else {
|
||||
_ConfirmedBanditKills = (_killingBlow select 0) getVariable ["ConfirmedBanditKills",0];
|
||||
(_killingBlow select 0) setVariable ["ConfirmedBanditKills",(_ConfirmedBanditKills + 1),true];
|
||||
};
|
||||
|
||||
|
||||
//Set the body as Studied for all.
|
||||
_body setVariable ["BodyStudied",true,true];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user