Dirk98
18-09-2004, 09:46 PM
Hello guys, need your help:
When I want to run a simple Sequential loop of 2 commands on a single joystick button I'm using the following script:
SEQUENCE
// First Command Operates on the first press of Joystick 1 Button 1
WHILE( JS1.B1 );
CMS.B1 = TRUE;
DELAY( 2 );
CMS.B1 = FALSE;
DELAY( 2 );
// Second Command Operates on the second press of Joystick 1 Button 1
WHILE( JS1.B1 );
CMS.B2 = TRUE;
DELAY( 2 );
CMS.B2 = FALSE;
DELAY( 2 );
ENDSEQUENCE
The above sequence works for me as follows:
1st press: execute command 1
2nd press: execute command 2
3rd press: execute command 1 - etc. loop
But now I want the sequence to work as follows:
Version1:
1st press: execute command 1
2nd press: execute command 2
3rd press: execute command 1 - etc. loop of commands 1&2
UNTILL any other BUTTON on CH combo is pressed, then from command 1 ONLY
Version2:
Press 1st time: - command 1
Press 2nd time: - command 2
Press 3rd time: - command 3
Press 4th time: - command 2
Next presses - loop of commands 3 and 2
Version3:
Press 1st time: - command 1
Press 2nd time: - command 2
Press 3rd time: - command 2
Next presses - always command 2
Version4:
Press 1st time: - command 1
Press 2nd time: - command 2
Press 3rd time: - nothing
UNLESS a specific Button 2 on the CH Combo is pressed, then starts all over again.
Guys, desperately need examples of the scripts for the above, no way I can write them by myself. With your kind help though there's a chance I will dig it in the future.
Many thanks for your answers.
Dirk. :cheers:
When I want to run a simple Sequential loop of 2 commands on a single joystick button I'm using the following script:
SEQUENCE
// First Command Operates on the first press of Joystick 1 Button 1
WHILE( JS1.B1 );
CMS.B1 = TRUE;
DELAY( 2 );
CMS.B1 = FALSE;
DELAY( 2 );
// Second Command Operates on the second press of Joystick 1 Button 1
WHILE( JS1.B1 );
CMS.B2 = TRUE;
DELAY( 2 );
CMS.B2 = FALSE;
DELAY( 2 );
ENDSEQUENCE
The above sequence works for me as follows:
1st press: execute command 1
2nd press: execute command 2
3rd press: execute command 1 - etc. loop
But now I want the sequence to work as follows:
Version1:
1st press: execute command 1
2nd press: execute command 2
3rd press: execute command 1 - etc. loop of commands 1&2
UNTILL any other BUTTON on CH combo is pressed, then from command 1 ONLY
Version2:
Press 1st time: - command 1
Press 2nd time: - command 2
Press 3rd time: - command 3
Press 4th time: - command 2
Next presses - loop of commands 3 and 2
Version3:
Press 1st time: - command 1
Press 2nd time: - command 2
Press 3rd time: - command 2
Next presses - always command 2
Version4:
Press 1st time: - command 1
Press 2nd time: - command 2
Press 3rd time: - nothing
UNLESS a specific Button 2 on the CH Combo is pressed, then starts all over again.
Guys, desperately need examples of the scripts for the above, no way I can write them by myself. With your kind help though there's a chance I will dig it in the future.
Many thanks for your answers.
Dirk. :cheers: