Difference between revisions of "STRIG"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
(moved to STRIG(n))
imported>Clippy
m
Line 1: Line 1:
Page moved to [[STRIG(n)]]
The '''STRIG''' function returns button presses on game port (&H201) joystick(s).
 
 
''Syntax:'' IF STRIG(button%) THEN code
 
 
''Description:''
*'''[[Keywords currently not supported by QB64|Currently NOT supported in QB64!]]'''
* Button values used range from 0 to 7 only. Use joystick A values for just one joystick.
* Returns True(-1) or False(0) button press values for 2 joysticks:
:* STRIG(0) = -1 lower button 1 on joystick A pressed since last STRIG(0)
:* STRIG(1) = -1 lower button 1 on joystick A currently pressed
:* STRIG(2) = -1 lower button 1 on joystick B pressed since last STRIG(2)
:* STRIG(3) = -1 lower button 1 on joystick B currently pressed
:* STRIG(4) = -1 upper button 2 on joystick A pressed since last STRIG(4)
:* STRIG(5) = -1 upper button 2 on joystick A currently pressed
:* STRIG(6) = -1 upper button 2 on joystick B pressed since last STRIG(6)"
:* STRIG(7) = -1 upper button 2 on joystick B currently pressed
* STRIG(0), STRIG(2), STRIG(4) and STRIG(6) are used to monitor any presses that might have been missed.
 
 
''See also:''
 
* [[STRIG (statements)]]
* [[ON STRIG(n)]], [[STICK]]
 
 
 
{{PageNavigation}}

Revision as of 03:33, 6 November 2010

The STRIG function returns button presses on game port (&H201) joystick(s).


Syntax: IF STRIG(button%) THEN code


Description:

  • Currently NOT supported in QB64!
  • Button values used range from 0 to 7 only. Use joystick A values for just one joystick.
  • Returns True(-1) or False(0) button press values for 2 joysticks:
  • STRIG(0) = -1 lower button 1 on joystick A pressed since last STRIG(0)
  • STRIG(1) = -1 lower button 1 on joystick A currently pressed
  • STRIG(2) = -1 lower button 1 on joystick B pressed since last STRIG(2)
  • STRIG(3) = -1 lower button 1 on joystick B currently pressed
  • STRIG(4) = -1 upper button 2 on joystick A pressed since last STRIG(4)
  • STRIG(5) = -1 upper button 2 on joystick A currently pressed
  • STRIG(6) = -1 upper button 2 on joystick B pressed since last STRIG(6)"
  • STRIG(7) = -1 upper button 2 on joystick B currently pressed
  • STRIG(0), STRIG(2), STRIG(4) and STRIG(6) are used to monitor any presses that might have been missed.


See also:




Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page