H
Hans66
Guest
Thank you so much everything was correct code wise i needed to add the sprite mask to the slot objects tried today have been swarmed with engineering school lately. Thank you again! now onto creating the menu.So the code looks all good. I suspect the reason you're having issue is something causing the mouse pressed event to not actually trigger. I have a few ideas but I can't say for sure so you'll need to investigate this. Here are some suggestions:
- The slot objects are not in the correct place, if you have a moving view. (Unlikely since your drawing works).
- The slot objects need a mask assigned to detect if they are being clicked on. Make sure of that, and make the mask the same size as the item sprite itself.
- If you'd rather not assign a mask that way, you can also check for the mouse press by using a global mouse left pressed event instead, and checking if the mouse_x and mouse_y is overlapping with the desired area of the slot.
- Also try adding a show_debug_message to the left press event to make sure it isn't running, to verify my theory and ensure it isn't another issue.