pressed = JoyFire(port[, button])
Trueif a button of the Joystick plugged into the port specified by
porthas been pressed. Otherwise
Falseis returned. The optional argument
buttonspecifies 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 currently plugged in joysticks
using the CountJoysticks() function. Please note that under AmigaOS,
port 0 refers to the standard joystick port although this is in reality
port 1. Hollywood does it this way just for cross-platform consistency:
Port 0 shall always refer to the default joystick.
Trueif 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 buttons
While(fire = FALSE) fire = JoyFire(0) Wait(2) WendThe above code waits until the user presses fire.