NL Weapons - Scripts

This commit is contained in:
He-Man 2019-09-13 14:53:47 +02:00
parent 9b1dc356e9
commit 4a6506513c
2 changed files with 50 additions and 41 deletions

View File

@ -18,15 +18,6 @@ if !(_source isEqualTo _unit) then {
switch _projectile do {
case "B_EnergyPack": {
EPOCH_HandleDamageTimeOut = diag_ticktime + 0.1;
if (currentweapon _source isEqualTo "pvcrifle_01_epoch") then {
if !(lifeState _unit == "INCAPACITATED") then {
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
_unit setUnconscious true;
EPOCH_UnconsciousTime = diag_ticktime + 60 + (random 120);
["You are Knocked out for a while...",5] call Epoch_Message;
};
}
else {
if (_source distance _unit > 10) exitwith {};
if !(missionnamespace getvariable ["EPOCH_OldRevive",false]) then {
_attachments = handgunItems _source;
@ -63,15 +54,31 @@ if !(_source isEqualTo _unit) then {
};
};
};
};
case "B_KnockOut": {
case "shell_12g_bb";
case "bbag_pvc";
case "xbow_tranq";
case "tranq_dart": {
if !(lifeState _unit == "INCAPACITATED") then {
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
_unit setUnconscious true;
EPOCH_UnconsciousTime = diag_ticktime + 60 + (random 120);
(["CfgEpochClient", "UnconsciousTime", [60,180]] call EPOCH_fnc_returnConfigEntryV2) params [["_mintime",60],["_maxtime",180]];
EPOCH_UnconsciousTime = diag_ticktime + _mintime + (random (_maxtime - _mintime));
["You are Knocked out for a while...",5] call Epoch_Message;
};
};
case "B_Swing";
case "B_Stick";
case "B_Hatchet": {
if !(lifeState _unit == "INCAPACITATED") then {
if ((random 100) < (["CfgEpochClient", "UnconsciousChance", 30] call EPOCH_fnc_returnConfigEntryV2)) then {
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
_unit setUnconscious true;
(["CfgEpochClient", "UnconsciousTime", [60,180]] call EPOCH_fnc_returnConfigEntryV2) params [["_mintime",60],["_maxtime",180]];
EPOCH_UnconsciousTime = diag_ticktime + _mintime + (random (_maxtime - _mintime));
["You are Knocked out for a while...",5] call Epoch_Message;
};
};
};
};
};
_damage

View File

@ -19,6 +19,8 @@ class CfgEpochClient
debug = "true"; // true = enable extra rpt debug lines, false to disable
UseOldRevive = "false"; // Revive / Heal Player has been changed to use "HandleDamage" Eventhandler. If scripts are breaking it for you, set it to true (not recommended!)
UnconsciousChance = 30; // Change in percent to get unconscious by a hit with an Axe / Sledge / Sword
UnconsciousTime[] = {60,180}; // Min / Max time for unconscious after you got a hit from a non lethal weapon / Axe / Sledge / Sword
antagonistRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100
NuisanceMulti = 0.5; // Multi for Nuisance increase on shooting - higher Nuisance effect at least antagonist spawn change. (0-1, default 0.5)