| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>JoyHit (button,[port])</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- button = number of joystick button to check
<br />
- port = number of joystick port to check (optional)
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- This command returns the number of times a specified joystick button has been hit since the last time you called the JoyHit() command. Also see KeyHit and MouseHit.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/JoyHit.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; JoyHit Example
<br />
-
<br />
- ; Set up the timer
<br />
- current=MilliSecs()
<br />
- Print "Press FireButton 1 a bunch of times for five seconds..."
<br />
-
<br />
- ; Wait 5 seconds
<br />
- While MilliSecs() < current+5000
<br />
- Wend
<br />
-
<br />
- ; Print the results
<br />
- Print "Pressed button " + JoyHit(1) + " times."
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=JoyHit&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|