no click response in a room... sometimes

Started by selmiak, Fri 19/04/2019 19:55:18

Previous topic - Next topic

selmiak

I have no idea how this happens but I try to explain it best I can.

I have coded a custom debug system with simple buttons that call a function to transport the player to the desired room, set an integer like a chapter number (that is also set in game and accordingly the room start happens).
When I access one room directly through my debug I have no problems, but when I access this room while playing the game and reaching it it SOMETIMES doesn't react to any mouseclick input. The mouse cursor is visible and moves on screen.

I'm having a hard time reproducing this as it only happens like the second time I play and then every 6th time and it takes a lot of time to reach that room.
I coded around on a tutorial template I got and it uses guis. The unresponsiveness mostly happens when I do the complete tutorial, which is really annoying, especially for a player that needs this. also for me to test this :P
when I abort the tutorial it doesn't happen.
But then I disabled all the guis for the tutorial (and all other guis that could be overlapping the screen) in the start condition for said room and it still happens from time to time. Also all needed variables for the tutorial and other guis are set explicitly to not interfere in the room_Load or room_AfterFadeIn. I spammed this in the start conditions tooo, still it happens from time to time:

Code: ags
  mouse.EnableMode(eModeInteract);
  mouse.EnableMode(eModeUseinv);
  mouse.EnableMode(eModeWalkto);
  mouse.Mode = eModeInteract;
  Mouse.Mode = eModeInteract;


I checked the global on_mouse_click, it can't be that as I have the inventory also come down on mousewheel and only this works. All other clicks don't get accepted but they are if else conditions in global on_mouse_click.  On ESC the quit gui opens fine, keypress works, but that gui also accepts no clicks.
and the worst thing is, this only happens sometimes, but when it happens the game is broken. this gamebreaking bug drives me mad.

There cannot be any gui in the way, I suspect it is the mousemode still.
how could I reset the mousemodes on a leftclick?
I have the String.Format("%d", Mouse.Mode) in the global repex and display this on button M. it is 0 every time, which should be eModeInteract. how can I check in that situation how all the mousemode(s) are set? How does that compare to something else.
what could that be beside mousemodes? I'm a bit clueless.

SMF spam blocked by CleanTalk