LukeFF
17-06-2005, 10:45 PM
Hello,
I am trying to program a simple two-button sequence in Pacific Fighters which toggles between the Zoom In and and Zoom Out views. I have the sequence working in-game, but when I exit to Desktop the Joystick (Fighterstick USB) is not releasing the last command I sent via the sequence. My script looks like this:
SCRIPT
SEQUENCE
WAIT( JS1.B7 ); // Wait until Button 2 is pressed
A1 = A1 + 1; // Increment our message counter
IF( [ A1 > 1 ] ) THEN // If A1 is over three then
A1 = 0; // Reset A1 to 0
ENDIF
ENDSEQUENCE
SELECT( A1, POSITION ) OF
CASE 0:
CMS.B1 = TRUE; // Set the bit for our first message
EXITCASE:
CMS.B1 = FALSE; // Clear the bit for our first message
BREAK;
CASE 1:
CMS.B2 = TRUE; // Set the bit for our second message
EXITCASE:
CMS.B2 = FALSE; // Clear the bit for our first message
BREAK;
ENDSELECT
ENDSCRIPT
The key commands are the KBDEL (B2) and KBEND (B1). Any help with this would be much appreciated. Thanks!
I am trying to program a simple two-button sequence in Pacific Fighters which toggles between the Zoom In and and Zoom Out views. I have the sequence working in-game, but when I exit to Desktop the Joystick (Fighterstick USB) is not releasing the last command I sent via the sequence. My script looks like this:
SCRIPT
SEQUENCE
WAIT( JS1.B7 ); // Wait until Button 2 is pressed
A1 = A1 + 1; // Increment our message counter
IF( [ A1 > 1 ] ) THEN // If A1 is over three then
A1 = 0; // Reset A1 to 0
ENDIF
ENDSEQUENCE
SELECT( A1, POSITION ) OF
CASE 0:
CMS.B1 = TRUE; // Set the bit for our first message
EXITCASE:
CMS.B1 = FALSE; // Clear the bit for our first message
BREAK;
CASE 1:
CMS.B2 = TRUE; // Set the bit for our second message
EXITCASE:
CMS.B2 = FALSE; // Clear the bit for our first message
BREAK;
ENDSELECT
ENDSCRIPT
The key commands are the KBDEL (B2) and KBEND (B1). Any help with this would be much appreciated. Thanks!