I'm trying to use a joystick slider/axis as a curve select. I've tried the following and got a syntax error:
Code: Select all
if joystick[2].sliders[0] in range (0, 204.8):
x = Cyclic.1.getY(joystick[1].x)
y = Cyclic.1.getY(joystick[1].y)
z = Rudder.1.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (204.9, 409.6):
x = Cyclic.2.getY(joystick[1].x)
y = Cyclic.2.getY(joystick[1].y)
z = Rudder.2.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (409.7, 614.4):
x = Cyclic.3.getY(joystick[1].x)
y = Cyclic.3.getY(joystick[1].y)
z = Rudder.3.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (614.5, 819.2):
x = Cyclic.4.getY(joystick[1].x)
y = Cyclic.4.getY(joystick[1].y)
z = Rudder.4.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (819.3, 1024):
x = Cyclic.5.getY(joystick[1].x)
y = Cyclic.5.getY(joystick[1].y)
z = Rudder.5.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (1024.1, 1228.8):
x = Cyclic.6.getY(joystick[1].x)
y = Cyclic.6.getY(joystick[1].y)
z = Rudder.6.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (1228.9, 1433.6):
x = Cyclic.7.getY(joystick[1].x)
y = Cyclic.7.getY(joystick[1].y)
z = Rudder.7.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (1433.7, 1638.4):
x = Cyclic.8.getY(joystick[1].x)
y = Cyclic.8.getY(joystick[1].y)
z = Rudder.8.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (1638.5, 1843.2):
x = Cyclic.9.getY(joystick[1].x)
y = Cyclic.9.getY(joystick[1].y)
z = Rudder.9.getY(joystick[6].zRotation)
if joystick[2].sliders[0] in range (1843.3, 2048):
x = Cyclic.getY(joystick[1].x)
y = Cyclic.getY(joystick[1].y)
z = Rudder.getY(joystick[6].zRotation)