5,775
edits
No edit summary |
|||
| Line 381: | Line 381: | ||
print("Just", " a ", "test"); | print("Just", " a ", "test"); | ||
===Logitech=== | |||
Some particularly useful ideas for programming scripts within joystick XML files: | |||
* Logitech Extreme Digital 3D Pro joystick | |||
var brake = !getprop("/controls/gear/brake-parking"); | |||
setprop("/controls/gear/brake-parking", brake); | |||
* You can also make your own values on the property tree: | |||
setprop("/input/joysticks/js[0]/myjoystick-modifier", 1); | |||
var mod = getprop("/input/joysticks/js[0]/myjoystick-modifier"); | |||
* You can print to terminal using the print function. This is very useful for debugging. | |||
==Resource== | ==Resource== | ||
* [http://www.flightgear.org/Docs/getstart/getstartch3.html#x8-360003.6 The FlightGear Manual] | * [http://www.flightgear.org/Docs/getstart/getstartch3.html#x8-360003.6 The FlightGear Manual] | ||
edits