Deadzone for Controllers

Use this script if your analog stick has deadzone problems. You can put the code in any script you want. Please enjoy. - Token
Version1.10
Authortoken
Publish DateSat, 17 May 2014 - 20:45
Last UpdateFri, 30 May 2014 - 23:48
Downloads194
RATE


1

1

Release Notes: I added deadzone modifiers.
Code: Select all
define DeadZoneLeftStick = 12; // Deadzone modifiers
define DeadZoneRightStick = 12;
 
main {
 
if(get_val(10) <= DeadZoneRightStick && get_val(10) >= DeadZoneRightStick*-1) set_val(10,0);
if(get_val( 9) <= DeadZoneRightStick && get_val( 9) >= DeadZoneRightStick*-1) set_val( 9,0);
if(get_val(12) <= DeadZoneLeftStick && get_val(12) >= DeadZoneLeftStick*-1) set_val(12,0);
if(get_val(11) <= DeadZoneLeftStick && get_val(11) >= DeadZoneLeftStick*-1) set_val(11,0);
 
}