YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

In-Game: Instance in attached Sequence does not react to mouse clicks until its position is changed #2634

Open gm-bug-reporter[bot] opened 10 months ago

gm-bug-reporter[bot] commented 10 months ago

Description

Hi So, I have two sequences which I initialize in the object o_nettlepad, then I set both of them to specific frame. I use these sequences for my GUI system by setting them to specific frames when I need to show specific sequence. Frame 0 means you can't see sequence instances, frame 1 - all instances should be shown. Mouse click on o_button_settings changes headposition of current sequence it is part of to frame 0 and then sets headposiion of the next sequence to 1. Mouse click on o_button_back should do the same, but it doesn't until I move my o_nettlepad around the room a bit.

All resources connected to the bug are located in the group Nettlepad.

Also, I don't know why o_nettlepad is translucent in the room. It does so when placed in the room manually, in full project I spawn it with level_manager. Looks like I'm missing some option to change the alpha of a layer somewhere.

Steps To Reproduce

  1. Launch the game and see o_nettlepad in the room
  2. click a button with a cog icon in the top right corner of the object in the room
  3. Observe o_nettlepad change
  4. try to click the button in the top right corner - it should react to mouse cursor presence but its action won't be executed
  5. Try to drag an object around the room to a new place. It can be done while left mouse is pressed
  6. try to click the button in the top right corner again
  7. Observe o_nettlepad change

44d4cec7-1ae9-4122-9788-579e79671ddb

Motivaetdclock commented 10 months ago

for me its happening the exact oposite the mouse wont move while im not clicking M1 i still havent managed to find a sure way to replicate it, it happens mostly when i have more than 1 input at a time and i dint manage to replicate in runtimes older than v2023.11.1.160

Notlea commented 10 months ago

https://github.com/YoYoGames/GameMaker-Bugs/assets/36668924/64b1ab3c-a4c2-4ac8-9c6e-a705adb39048

One important addition to that bug: After the sequence is changed to another one, invisible buttons are still clickable. Steps to reproduce:

I tried several approaches to that bug:

  1. I`ve moved all objects to one sequence and switched frames - buttons were still clickable while being invisible
  2. I`ve tried to add an artificial shake to the object to replicate like it was dragged around for several pixels - buttons were still clickable while being invisible
  3. I've tried to destroy the sequence completely and create a new one - the bug has gone, but that approach isn't that useful for me because I need a system to store some data and load each time the sequence changes.
  4. The bug with the "Settings" and "Back" buttons is gone if you place them in different places, so they won`t overlap.

Another thing I've found - if the object inside the sequence creates a new instance that has an empty Draw event and draws itself in Draw GUI event only, that new instance still performs Draw event and is visible on both layers - regular and GUI one. There are a lot of things that go wrong.

https://github.com/YoYoGames/GameMaker-Bugs/assets/36668924/95bc892f-573d-4049-9ca0-798e24e94d5b

Updated project: Sequence_bug.zip

Notlea commented 10 months ago

Additional info: Clicks on invisible buttons can be prevented with additional checks for visibility. if(position_meeting(MOUSE_GUI_X, MOUSE_GUI_Y, id) && visible) { } Other bugs are still present.