I just noticed something rather strange. It seems like the JoyHit command doesn't work properly. The following is taken straight from the Blitz3D documentation:
For me this program always tells me I hit the button 0 times. Only when I hold down the button until the end it says I pressed it 1 time. Did the behavior of JoyHit and JoyDown get mixed up?
EDIT: I just did another test and found out that JoyHit and JoyDown actually do not behave exactly the same.
Try keeping Button 1 down while running this:
It gave me the output:
1
0
1
1
So JoyHit and JoyDown don't do the same thing, but JoyHit is still broken I think. In this example the first JoyHit should return 0, because I started holding down the button before I ran the program. Also, as shown in my first example, JoyHit never returns an integer higher than 1.
; JoyHit Example ; Set up the timer current=MilliSecs() Print "Press FireButton 1 a bunch of times for five seconds..." ; Wait 5 seconds While MilliSecs() < current+5000 Wend ; Print the results Print "Pressed button " + JoyHit(1) + " times."
For me this program always tells me I hit the button 0 times. Only when I hold down the button until the end it says I pressed it 1 time. Did the behavior of JoyHit and JoyDown get mixed up?
EDIT: I just did another test and found out that JoyHit and JoyDown actually do not behave exactly the same.
Try keeping Button 1 down while running this:
Print JoyHit(1) Print JoyHit(1) Print JoyDown(1) Print JoyDown(1)
It gave me the output:
1
0
1
1
So JoyHit and JoyDown don't do the same thing, but JoyHit is still broken I think. In this example the first JoyHit should return 0, because I started holding down the button before I ran the program. Also, as shown in my first example, JoyHit never returns an integer higher than 1.