diff --git a/Changelog.txt b/Changelog.txt new file mode 100644 index 0000000..71bccba --- /dev/null +++ b/Changelog.txt @@ -0,0 +1,4 @@ + +Verson 1.1 + +Added code to stop the autorun script if the player has injuries to the legs, abdomen or diaphragm. \ No newline at end of file diff --git a/Epoch.Altis/addons/DBD/canRun.sqf b/Epoch.Altis/addons/DBD/canRun.sqf index 0787b18..cc8451a 100644 --- a/Epoch.Altis/addons/DBD/canRun.sqf +++ b/Epoch.Altis/addons/DBD/canRun.sqf @@ -2,11 +2,16 @@ Adapted from code written by Exile Mod team. By Ghostrider-DbD- For DeathBeforeDishonorClan - + Last Update 8/13/17 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ -_canRun = (vehicle player == player && !(surfaceIsWater (getPos player)) && !((damage player) >= 0.5)); +private["_legsHit","_canRun","_allHitPointsDamage","_index"]; +_legsHit = (vehicle player) getHitPointDamage "HitLegs"; +_abdHit = (vehicle player) getHitPointDamage "HitAbdomen"; +_diaphragmHit = (vehicle player) getHitPointDamage "HitDiaphragm"; +_injured = if (_legsHit > 0.25 || _abdHit > 0.25 || _diaphragmHit > 0.25) then {true} else {false}; +_canRun = (vehicle player == player && !(surfaceIsWater (getPos player)) && !((damage player) >= 0.5) && !(_injured) ); _canRun diff --git a/README.md b/README.md index 7f9533d..c4255cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -epochmod Autorun Version 1.0 for Epochmod for Arma 3 version 0.5.0 + and Arma 3 V 1.70 +. +epochmod Autorun Version 1.1 for Epochmod for Arma 3 version 0.5.0 + and Arma 3 V 1.70 +. This is a simple script that adds an autorun function to epoch. I have tried to make installation as simple as possible so that this is plug and play.