1)First, drop a ‘Script’ device into the scene.
2)Next, create a relation constraint, and add the script device as the receiver.
3)Now you’ll want to add the script you’ve made to your scene.
4)At this point, you’ll see the script appear as an item within the ‘script device’; you’ll be able to connect things to it as you would any kBox.
5)Finally, drop your joystick device into the relation constraint, and connect your script with the desired button on the joystick.
Note: Keep in mind that the script event will trigger when a boolean value of 1 is reached from the joystick (how most joysticks indicate a button press).