My mouse cursor clicks appear not to be registering beyond 320x, 200y in a scrolling room. I've altered the original code thusly:
function on_mouse_click (int button){
....
else if (button==LEFT) {
ProcessClick (mouse.x +GetViewportX (), mouse.y +GetViewportY (), GetCursorMode () );
}
...
The funny thing is, I've used this code before and it worked just fine. This game compiles fine, but then won't register mouse clicks beyond 320x, 200y. The only things I've done that I've never done before are:
-The main character follows the cursor in Repeatedly Execute (room) -he follows fine everywhere with THE SAME CODE!!!!!
-I've got a LOT of sprites idle.
The only thing I could think of is that I might have too many sprites, but as I say it seems to work fine on the upper left hand side of the screen. Does anybody out there have any idea of what might be wrong here?
EDIT: I also have a whole screen GUI (with no buttons, only a background image) that completely blocks mouse clicks, including right-click cursor cycling. When I turn it off I can click again, but only in the upper left hand corner. Could the GUI be interferring with mouse clicks even when it's not on? And how can you set a GUI so it's clickthroughable? I have a large hole in the centre of my GUI, but I suppose the game could be interpretting the hole as part of the GUI....
Also, I'm using AGS version 2.6. Yes, I know I should upgrade, but I'm in the middle of finishing my MAGS game and I have no time to learn the new features at the moment!
function on_mouse_click (int button){
....
else if (button==LEFT) {
ProcessClick (mouse.x +GetViewportX (), mouse.y +GetViewportY (), GetCursorMode () );
}
...
The funny thing is, I've used this code before and it worked just fine. This game compiles fine, but then won't register mouse clicks beyond 320x, 200y. The only things I've done that I've never done before are:
-The main character follows the cursor in Repeatedly Execute (room) -he follows fine everywhere with THE SAME CODE!!!!!
-I've got a LOT of sprites idle.
The only thing I could think of is that I might have too many sprites, but as I say it seems to work fine on the upper left hand side of the screen. Does anybody out there have any idea of what might be wrong here?
EDIT: I also have a whole screen GUI (with no buttons, only a background image) that completely blocks mouse clicks, including right-click cursor cycling. When I turn it off I can click again, but only in the upper left hand corner. Could the GUI be interferring with mouse clicks even when it's not on? And how can you set a GUI so it's clickthroughable? I have a large hole in the centre of my GUI, but I suppose the game could be interpretting the hole as part of the GUI....
Also, I'm using AGS version 2.6. Yes, I know I should upgrade, but I'm in the middle of finishing my MAGS game and I have no time to learn the new features at the moment!