In order to navigate the sidebar in my game, you have to click on arrow buttons. The problem is, that after two clicks, both mouseclick behaviors stop responding. Does anyone else experience this or is it just me?
I havenât looked at the code but Iâm guessing itâs because you have 2 mouse click behaviors. Make sure the messages are set to âsend to myselfâ
If you have to mouse behaviors with Down things get messed up, so when you need a down just use a mailbox with âdownâ.
@grazer
Whenever I replace the mouseclick behaviors, it will work fine. Then, Iâll open the game in a new tab and it will be broken again. Iâve tried adding distance between the two buttons, but that doesnât work either. Itâs not that the buttons donât work, itâs that they only work sometimes.
Also, Iâm not using messages or the âdownâ setting.
Looking at the code rn, Iâll see what I can do in a sec
I have absolutely no idea why this works, but add a second mouse not connected to anything. That fixed it for me. Also nice game, is it for the jam?
Yes. I do these for the experience they provide. That tutorial was my very first (competent) tutorial.
Did adding another mouse behavior fix it?
Yes, it did. As soon as Grazer gets the bug fixed, Iâll give you the âSolutionâ.
Thanks so much for the help!
@grazer
This problem is still consistent. I was wondering if you would fix this before the game jam is over, because itâs a large, game-breaking bug that I canât fix myself.
Hey @DarkStar_Studios - I havenât looked at this issue yet, but Iâll do it now. Can explain to me how to reproduce the problem, and where are the mouse click triggers that are not activating?
In the main game, the two arrow buttons that navigate the sidebar will stop taking inputs at page 4. This should happen automatically.
Hey @DarkStar_Studios - hereâs whatâs happening:
When you get to page 4, the Axe/Hammer weapon (New Type 114) moves into the same spot as the arrow buttons, and now the mouse click cannot tell which object is supposed to be getting the clicks (the hammer/axe thing is getting them instead of the arrow).
It would be worth adding some way to disambiguate mouse clicks somehow so that you can select how overlapping objects should share clicks (or not), but I wonât be able to do that tonight.
In the meantime, you can solve this a few different ways:
-
Make the icons in a single vertical column instead of a grid, and move them up/down instead of left/right (probably the simplest)
-
Spawn & destroy the column of icons for each page when you change pages
-
Move the arrows somewhere else, so they donât overlap (maybe the top or something?)
-
Use a single column of icons, and just change animation frames instead of moving them around
Maybe other ways too? Those are just the first ideas that came to mind. Let me know if any of that doesnât make sense
I tried option 1, and that seemed to fix it. Thanks so much for the help!