Hi,
I am writing some code that checks to see if left or right mouse button is clicked. The problem is mousehit(2) is not responding. My right mouse button does work anywhere else but in my main code. Anyone know why this is or experienced anything like this. If I simply change mousehit(2) to mouseHit(3), the middle mouse button executes the code properly. Anyway here is a snippet of the code.
p.s. Also there is no where else in the code that mouseHit(2) is called. Strange.
I am writing some code that checks to see if left or right mouse button is clicked. The problem is mousehit(2) is not responding. My right mouse button does work anywhere else but in my main code. Anyone know why this is or experienced anything like this. If I simply change mousehit(2) to mouseHit(3), the middle mouse button executes the code properly. Anyway here is a snippet of the code.
If cameraMode = 1 ; camera mode to allow picking or interacting with objects If MouseHit (1) DebugLog "left mouse hit" End If If MouseHit (2) ;if rightclick set inventory view DebugLog "right mouse hit" cameraMode = 2;inventory view Return End If rotArea = 35 ; how many pixels to begin rotation If MouseX() < rotArea Then RotateEntity player,EntityPitch(player),EntityYaw(player)+1,EntityRoll(player) If MouseX() > screenWidth - rotArea Then RotateEntity player,EntityPitch(player),EntityYaw(player)-1,EntityRoll(player) If MouseY() < rotArea If EntityPitch(camera) > -70 RotateEntity camera,EntityPitch(camera)-1,EntityYaw(camera),EntityRoll(camera) End If End If If MouseY() > screenHeight - rotArea If EntityPitch(camera) < 70 RotateEntity camera,EntityPitch(camera)+1,EntityYaw(camera),EntityRoll(camera) End If End If End If ; end camera mode 1 If cameraMode = 2 ; inventory Mode If MouseHit(2) Or KeyHit(upkey) Or KeyHit(downkey) Or KeyHit (rightKey) Or KeyHit (leftKey) sketchBookOn = False cameraMode = 1 Return End If sketchBookOn = True End If ; end camera mode 2
p.s. Also there is no where else in the code that mouseHit(2) is called. Strange.