Drokz Posted June 20, 2017 Report Share Posted June 20, 2017 Simple AutoRun Script DePbo your mission.epoch folder Then select epoch_code -> customs -> and open EPOCH_custom_EH_KeyDown.sqf After line 16 (_handled = false;) paste the following code: Spoiler /////////////// SimpleAutorun by ShadowRanger24/He-Man/xDrokZ //////////////// if (vehicle player == player) then { if (_dikCode == 0x0B) then { if (isNil "AR_active") then {AR_active = false;}; if (AR_active) exitWith {AR_active = false; _handled = true;}; If (surfaceiswater (getpos player)) exitWith {AR_active = false; _handled = true;}; AR_active = true; AR_weapon = currentWeapon player; AR_animation = switch (true) do { case (AR_weapon isEqualTo ""): {"AmovPercMevaSnonWnonDf"}; case (AR_weapon isEqualTo (primaryWeapon player)): {"AmovPercMevaSlowWrflDf"}; case (AR_weapon isEqualTo (secondaryWeapon player)): {"AmovPercMevaSlowWrflDf"}; case (AR_weapon isEqualTo (handgunWeapon player)): {"AmovPercMevaSlowWpstDf"}; }; player playMoveNow AR_animation; player addEventHandler ["AnimChanged", { if((!AR_active) || {!((currentWeapon player) isEqualTo AR_activeWep)})exitWith { player removeEventHandler ["AnimChanged", _thisEventHandler]; AR_weapon = currentWeapon player; AR_animation = switch (true) do { case (AR_weapon isEqualTo ""): {"AmovPercMstpSnonWnonDnon"}; case (AR_weapon isEqualTo (primaryWeapon player)): {"AmovPercMstpSlowWrflDnon"}; case (AR_weapon isEqualTo (secondaryWeapon player)): {"AmovPercMevaSlowWlnrDf"}; case (AR_weapon isEqualTo (handgunWeapon player)): {"AmovPercMstpSlowWpstDnon"}; }; player playMoveNow AR_animation; AR_active = false; AR_weapon = nil; AR_animation = nil; }; player playMove AR_animation; }]; }; }; ///////////// End Autorun ///////////// Save the file and repack your pbo. Press 0 to use this feature This is not a perfect AutoRun script, but it works so far. Current issues are that it doesn´t stop when you run up a hill, enter vehicles (it continues when you leave the vehicle again) or when you enter water. It also would be great to make it stop when hitting w,a, s, d or the arrow keys. I appreciate if anybody knows how to fix those and would like to share. I took it from the BI Forums, changed it a little bit and just wanted to show you how I made it to work with Epoch. So this is not my work at all. Original post by @oldmatechoc natoed 1 Link to comment Share on other sites More sharing options...
Drokz Posted June 22, 2017 Author Report Share Posted June 22, 2017 Even better Version by @Ghostrider-DbD-! 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