splash
11th May 2009, 09:44 AM
Hi,
I have a little question regarding this section of manual:
"A Simple Script
A simple example of a complete script might help give a little better idea of how the whole thing fits together. Suppose, for some reason you want to create a map with one Joystick in it. In that map, you want Button 2 on Control Manager Device 1 pressed when Button 2 on your joystick is released and vice-versa. It's a trivial example, not something with much practical use, but it does show how the data moves through the system.
Such a script might look like this:
SCRIPT
CMS.B1 = NOT JS1.B2;
ENDSCRIPT
The script only consists of one actual line aside from the SCRIPT and ENDSCRIPT statements. The line simply says "Set the state of CMS.B1 (the first button on the CMS Controls) to be the opposite of whatever the state of JS1.B2 (Button 2 on the Joystick is). Every time the loop is executed, the state of JS1.B2 is checked and the opposite of its value is sent to CMS.B1.
CMS.B1 isn't a device that Windows will automatically see, however, so you would go to the GUI and select Button 1 on the CMS Controls. Set it in DX Mode and assign it CM Device 1, Button 2. That makes the connection to the outside world. While you're in the GUI, you would also clear any assignment to CM Device 1, Button 2 that may already exist so that there won't be multiple devices trying to to control the button."
Is it really necessary to assign CM device 1 button 2 to work? May i use another button?
Thanks.
I have a little question regarding this section of manual:
"A Simple Script
A simple example of a complete script might help give a little better idea of how the whole thing fits together. Suppose, for some reason you want to create a map with one Joystick in it. In that map, you want Button 2 on Control Manager Device 1 pressed when Button 2 on your joystick is released and vice-versa. It's a trivial example, not something with much practical use, but it does show how the data moves through the system.
Such a script might look like this:
SCRIPT
CMS.B1 = NOT JS1.B2;
ENDSCRIPT
The script only consists of one actual line aside from the SCRIPT and ENDSCRIPT statements. The line simply says "Set the state of CMS.B1 (the first button on the CMS Controls) to be the opposite of whatever the state of JS1.B2 (Button 2 on the Joystick is). Every time the loop is executed, the state of JS1.B2 is checked and the opposite of its value is sent to CMS.B1.
CMS.B1 isn't a device that Windows will automatically see, however, so you would go to the GUI and select Button 1 on the CMS Controls. Set it in DX Mode and assign it CM Device 1, Button 2. That makes the connection to the outside world. While you're in the GUI, you would also clear any assignment to CM Device 1, Button 2 that may already exist so that there won't be multiple devices trying to to control the button."
Is it really necessary to assign CM device 1 button 2 to work? May i use another button?
Thanks.