pressed = JoyButton(port[, button])
True if a button of the Joystick plugged into the
port specified by port has been pressed. Otherwise False is returned.
The optional argument button specifies which button to look for.
If you are looking for a specific button, specify the number of this
button (must be between 1 and 32). If you are looking for multiple
buttons, specify 0 and this function will return a 32-bit mask in which
each of the 32 bits indicates the state of the button (pressed or not
pressed).
port can range from 0 to the number of joysticks currently plugged in
minus 1. You can find out the number of joysticks currently available
using the CountJoysticks() function. Please note
that under AmigaOS, port 0 addresses the standard joystick port although
this is port 1 on classic Amiga hardware. Hollywood switches these ports
for cross-platform consistency where port 0 shall always refer to the
default joystick.
True if button is pressed, otherwise FALSE; if you passed
0 for button, then this will be a 32-bit mask indicating
the states of all 32 buttonsWhile fire = FALSE fire = JoyButton(0) VWait WendThe above code waits until the user presses fire.