threshold
threshold
gets/sets the amount joystick has to move before sensor is triggered.
Return type: integer
Range: 32767 to -32767
Sample
Code
################### Get threshold
# get controller
controller = GameLogic.getCurrentController()
# get sensor attached to controller named FlightStick
sen = controller.sensors["FlightStick"]
# get amount joystick has to move
amount = sen.threshold
################### Set threshold
# get controller
controller = GameLogic.getCurrentController()
# get sensor attached to controller named FlightStick
sen = controller.sensors["FlightStick"]
# set amount joystick has to move
sen.threshold = 500
|