Change so it will only set to run state if you are moving

JIMBOB Posts: 23Member
edited May 20 in Scripts & Mods
This is make it so when your idle and press left shift to run the weapon wont go into the run state until your moving
Make changes to ''vp_FPInput.cs''

OLD
protected virtual void InputRun()
{

if (vp_Input.GetButton("Run")
|| vp_Input.GetAxisRaw("LeftTrigger") > 0.5f // sprint using the left gamepad trigger
z)
FPPlayer.Run.TryStart();
else
FPPlayer.Run.TryStop();

}

Change to
NEW
protected virtual void InputRun()
{

if (vp_Input.GetButton("Run") || vp_Input.GetAxisRaw("LeftTrigger") > 0.5f) // sprint using the left gamepad trigger

{
if(vp_Input.GetAxisRaw("Horizontal") > 0.5f || vp_Input.GetAxisRaw("Vertical") > 0.5f
|| vp_Input.GetAxisRaw("Horizontal") < -0.5f || vp_Input.GetAxisRaw("Vertical") < -0.5f)

FPPlayer.Run.TryStart();
else

FPPlayer.Run.TryStop();
}
else

FPPlayer.Run.TryStop();
}

Sign In or Register to comment.