Ghostrider-GRG Posted August 13, 2017 Report Share Posted August 13, 2017 I wrote a quick script to add autorun to Epoch. Dowload from the link below and read the install instructions in the download. https://github.com/Ghostrider-DbD-/Epoch.Altis-Autorun/blob/master/Epoch.Altis/addons/DBD/canRun.sqf Drokz and natoed 2 Link to comment Share on other sites More sharing options...
Drokz Posted August 14, 2017 Report Share Posted August 14, 2017 (edited) Nice thanks. This one includes the water check? Edit: Nvm found it in the code :) Edited August 14, 2017 by Drokz Link to comment Share on other sites More sharing options...
natoed Posted August 17, 2017 Report Share Posted August 17, 2017 @Ghostrider-DbD- Can still autorun underwater lol it is funny in away When in the water you can not autorun but you can autorun into the water and keep going. i'll record a video for shits n giggles Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted August 17, 2017 Author Report Share Posted August 17, 2017 2 hours ago, natoed said: @Ghostrider-DbD- Can still autorun underwater lol it is funny in away When in the water you can not autorun but you can autorun into the water and keep going. I'll record a video for shits n giggles Quite amusing. I'll have to look into that when I have a chance. Does anyone have thoughts on a solution? Link to comment Share on other sites More sharing options...
natoed Posted August 17, 2017 Report Share Posted August 17, 2017 Link to comment Share on other sites More sharing options...
natoed Posted August 18, 2017 Report Share Posted August 18, 2017 19 hours ago, Ghostrider-DbD- said: Quite amusing. I'll have to look into that when I have a chance. Does anyone have thoughts on a solution? I looking at the Example 2: _isUnderwater = eyePos player select 2 < 0; https://community.bistudio.com/wiki/underwater I see if i can come up with something tonight Ghostrider-GRG 1 Link to comment Share on other sites More sharing options...
natoed Posted August 19, 2017 Report Share Posted August 19, 2017 I tried adding any check to stopAutoRun.sqf but i can't get it to work, autorun keeps going and can't be stop, error's out or locks up my test server lol https://community.bistudio.com/wiki/underwater is no good btw have been trying with https://community.bistudio.com/wiki/getPosASL I'll have another crack when i have the time. /* Adapted from code written by Exile Mod team. By Ghostrider-DbD- For DeathBeforeDishonorClan * 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/. */ if (DBD_AutorunOn) then { DBD_AutorunOn = false; if ((vehicle player) isEqualTo player) then // checks if player is a vehicle { if (alive player) then { hint "Autorun De-activated"; player switchMove ""; }; }; }; true // ASLtoATL getPosASL player // getPosasl player /* if ((vehicle player) isEqualTo player) then // checks if player is a vehicle else if ((getPosasl player) select 2 < -0.5) then // checks if player in 0.5 meter in water Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted August 19, 2017 Author Report Share Posted August 19, 2017 2 hours ago, natoed said: I tried adding any check to stopAutoRun.sqf but i can't get it to work, autorun keeps going and can't be stop, error's out or locks up my test server lol https://community.bistudio.com/wiki/underwater is no good btw have been trying with https://community.bistudio.com/wiki/getPosASL I'll have another crack when i have the time. /* Adapted from code written by Exile Mod team. By Ghostrider-DbD- For DeathBeforeDishonorClan * 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/. */ if (DBD_AutorunOn) then { DBD_AutorunOn = false; if ((vehicle player) isEqualTo player) then // checks if player is a vehicle { if (alive player) then { hint "Autorun De-activated"; player switchMove ""; }; }; }; true // ASLtoATL getPosASL player // getPosasl player /* if ((vehicle player) isEqualTo player) then // checks if player is a vehicle else if ((getPosasl player) select 2 < -0.5) then // checks if player in 0.5 meter in water The check for whether/when to stop autorun is done in the canrun.sqf script. I would add any check for being in water etc. there. Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted August 19, 2017 Author Report Share Posted August 19, 2017 19 hours ago, natoed said: I looking at the Example 2: _isUnderwater = eyePos player select 2 < 0; https://community.bistudio.com/wiki/underwater I see if i can come up with something tonight in canrun.sqf try changing: _canRun = (vehicle player == player && !(surfaceIsWater (getPos player)) && !((damage player) >= 0.5) && !(_injured) ); to private _underwater = (underwater player || eyePos player select 2 < 0 || surfaceIsWater (getPos player)); _canRun = (vehicle player == player && !(_underwater) && !((damage player) >= 0.5) && !(_injured) ); Link to comment Share on other sites More sharing options...
Brian Soanes Posted August 19, 2017 Report Share Posted August 19, 2017 Had a little play around with the code, will stop autorunning if the player enters water and changed hints to the new Epoch messages autoRun.sqf if (!DBD_AutorunOn) then { _canRun = call DBD_canRun; if (_canRun) then { DBD_AutorunOn = true; ["Autorun Activated", 3] call Epoch_message; }; } else { call DBD_stopAutoRun; player switchMove ""; }; canRun.sqf 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}; _overWater = !(position player isFlatEmpty [-1, -1, -1, -1, 2, false] isEqualTo []); _canRun = (vehicle player == player && !(_overWater) && !((damage player) >= 0.5) && !(_injured)); _canRun stopAutoRun.sqf if (DBD_AutorunOn) then { DBD_AutorunOn = false; if ((vehicle player) isEqualTo player) then { if (alive player) then { ["Autorun deactivated", 3] call Epoch_message; player switchMove ""; }; }; }; true EPOCH_custom_OnEachFrame.sqf if (DBD_AutorunOn) then { private _OK_toRun = call DBD_canRun; if (_OK_toRun) then { player playAction "FastF"; } else { DBD_AutorunOn = false; player switchMove ""; }; }; natoed and Drokz 1 1 Link to comment Share on other sites More sharing options...
Drokz Posted August 19, 2017 Report Share Posted August 19, 2017 Thx Brian ;) https://github.com/xDrokZ/Autorun-Epoch This one also does the trick. Its all inside the custom keydown. NOTE: I was told this one will not work with infistar natoed and Brian Soanes 1 1 Link to comment Share on other sites More sharing options...
Drokz Posted August 23, 2017 Report Share Posted August 23, 2017 https://github.com/xDrokZ/Autorun-Epoch Updated Version including an Icon for Autorun when enabled and a check for running on Hills Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now