One time I made a game where you slide the numbers around and put them in order. I called Keyhit by saying for example:
If (board(0) = 4) And (KeyHit(203))
board(0) = board(1)
board(1) = 4
...
EndIf
It didn't work.
Then I tried saying: If KeyHit(203) Then leftkey = 1
My new code:
If (board(0) = 4) And (leftkey = 1)
board(0) = board(1)
board(1) = 4
...
EndIf
It worked.
(By the way incase you were wondering, if a tile = 4 it is blank in this program.)
So instead of calling MouseHit directly, do what I did with KeyHit. It might work.
If (board(0) = 4) And (KeyHit(203))
board(0) = board(1)
board(1) = 4
...
EndIf
It didn't work.
Then I tried saying: If KeyHit(203) Then leftkey = 1
My new code:
If (board(0) = 4) And (leftkey = 1)
board(0) = board(1)
board(1) = 4
...
EndIf
It worked.
(By the way incase you were wondering, if a tile = 4 it is blank in this program.)
So instead of calling MouseHit directly, do what I did with KeyHit. It might work.