I am writing here beacause i think it's more long lasting than the shoutbox and could be helptful for others:

The script with the new build:

joy = Runtime.createAndStart("joy","Joystick")
def onJoystickInput(data):
 print data

prints data in form of: [A] 1.0000
                                   [A] 0.0000

How can i handle this data in an if-code for example. Do i have to handle it like a string:  
if(data == '[A] 1.0000'):

(didnt really work for me) or is it an array and i have to handle it with a for-code for example?



7 years ago

Hey Kakadu31... modified the python example in the joystick service page ! Hope it's more clear now !