Testing Confirmed Kills System.

Vanilla development commit:
4881e00ecf

New - Journal Kills will only update during the session on confirmed
Kills (study dead body).
This commit is contained in:
ebaydayz
2016-07-21 11:31:47 -04:00
parent 9ae21dd4f5
commit f2687345cd
6 changed files with 31 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ class horde_journal_pages_bandits
{
idd = -1;
movingEnable = false;
onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['banditKills', 0]] call horde_epeen_setText_stats_fnc;";
onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['ConfirmedBanditKills', 0]] call horde_epeen_setText_stats_fnc;";
enableSimulation = true;
controlsBackground[] = {};
objects[] = {};

View File

@@ -11,7 +11,7 @@ class horde_journal_pages_murders
{
idd = -1;
movingEnable = false;
onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['humanKills', 0]] call horde_epeen_setText_stats_fnc;";
onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['ConfirmedHumanKills', 0]] call horde_epeen_setText_stats_fnc;";
enableSimulation = true;
controlsBackground[] = {};
objects[] = {};

View File

@@ -4,5 +4,14 @@ _body = _this select 3;
_name = _body getVariable["bodyName","unknown"];
_method = _body getVariable["deathType","unknown"];
_methodStr = localize format ["str_death_%1",_method];
_killingBlow = _body getVariable "KillingBlow";
format[localize "str_player_studybody",_name,_methodStr] call dayz_rollingMessages;
if (typeName _killingBlow == "OBJECT") then {
_ConfirmedHumanKills = _killingBlow getVariable ["ConfirmedHumanKills",0];
_killingBlow setVariable ["ConfirmedHumanKills",(_ConfirmedHumanKills + 1),true];
} else {
_ConfirmedBanditKills = _killingBlow getVariable ["ConfirmedBanditKills",0];
_killingBlow setVariable ["ConfirmedBanditKills",(_ConfirmedBanditKills + 1),true];
};

View File

@@ -102,6 +102,11 @@ if (count _array > 0) then {
};
};
_body setVariable ["deathType",_method,true];
//Setup for study bodys.
if ((!isNull _source) && (_source != player)) then {
_body setVariable ["KillingBlow",_source,true];
};
};
terminate dayz_musicH;

View File

@@ -23,6 +23,9 @@ _headShots = player getVariable ["headShots",0];
_humanKills = player getVariable ["humanKills",0];
_banditKills = player getVariable ["banditKills",0];
_achievements = player getVariable ["Achievements",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];
_ConfirmedHumanKills = player getVariable ["ConfirmedHumanKills",0];
_ConfirmedBanditKills = player getVariable ["ConfirmedBanditKills",0];
_friendlies = player getVariable ["friendlies",[]];
_tagSetting = player getVariable ["DZE_display_name",false];
@@ -78,6 +81,9 @@ player setVariable ["banditKills",_banditKills,true];
player setVariable ["characterID",_charID,true];
player setVariable ["worldspace",_worldspace];
player setVariable ["Achievements",_achievements];
player getVariable ["ConfirmedHumanKills",_ConfirmedHumanKills,true];
player getVariable ["ConfirmedBanditKills",_ConfirmedBanditKills,true];
player setVariable ["friendlies",_friendlies,true];
player setVariable ["DZE_display_name",_tagSetting,true];

View File

@@ -141,6 +141,11 @@ if (count _stats > 0) then {
_playerObj setVariable ["headShots",(_stats select 1),true];
_playerObj setVariable ["humanKills",(_stats select 2),true];
_playerObj setVariable ["banditKills",(_stats select 3),true];
//ConfirmedKills
_playerObj setVariable ["ConfirmedHumanKills",(_stats select 2),true];
_playerObj setVariable ["ConfirmedBanditKills",(_stats select 3),true];
_playerObj addScore (_stats select 1);
//Save Score
@@ -162,6 +167,10 @@ if (count _stats > 0) then {
_playerObj setVariable ["humanKills",0,true];
_playerObj setVariable ["banditKills",0,true];
_playerObj setVariable ["headShots",0,true];
//ConfirmedKills
_playerObj setVariable ["ConfirmedHumanKills",0,true];
_playerObj setVariable ["ConfirmedBanditKills",0,true];
//record for Server JIP checks
_playerObj setVariable ["zombieKills_CHK",0];