• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!


  1. TheOnlyWRT

    Creating a bullet relative to a rotated sprite

    Hello! I have a top-down shooter where the player shoots towards the mouse with both the player and bullet sprite rotating towards the mouse. However, I am trying to get the bullet to spawn at the tip of the gun on the player's sprite, but I am having a real hard time doing that. The code I...
  2. K

    SOLVED sprite_index in x and y axis change

    thats the code //for y axis if(y > mouse_y){ sprite_index = spr_player_back } if(y < mouse_y){ sprite_index = spr_player_front } if(y != yprevious && y > mouse_y){ sprite_index = spr_player_walkback } if(y != yprevious && y < mouse_y){ sprite_index = spr_player_walkfront } if(y < mouse_y...
  3. samspade

    Design Step Events Versus GML Events

    Which would you rather use and why: an object where everything is in the step event, an object where everything is in multiple events? Example, a button object that has left pressed event, the mouse enter and leave event, the left released event or one object that does the exact same thing but...
  4. O

    Mouse clicks are not working with laptop touchscreen with HTML5 and Firefox/Chrome.

    I have an application that uses a lot of Mouse->LeftPressed events and it is exported to HTML5. When I run it on a Windows 10 Laptop with Edge it works fine. But Chrome and Firefox won't register the events. However, MouseEnter events seem to register when I touch the screen. I have to use a...
  5. O

    HTML5 HTML5 mouse coordinates are offset when browser is scrolled.

    Hi, I am having issues with an HTML5 game. The game is 800x600 and is centered in the browser window. Even though the canvas is completely within the visible region of the browser page the browser still adds scrollbars. If these move at all then the mouse coordinates in the canvas will be...
  6. If Programable_Matter

    Windows How to make Program with the ability to highlight the text with the mouse (Cursor)

    I've been making a lot of programs and they have been going well however I cannot make the text that has been drawn "highlightable" like you would be able to in Microsoft Word, Notepad, or other software which deals with characters. Is there are particular code which can enable me to highlight...
  7. G

    Custom Cursor in Drag and Drop

    Hey, I'm developing a sort of five nights at freddy's style game for my girlfriends birthday coming up, and one of the things i wanted to include is a custom mouse cursor while within the game. However, i don't have any coding experience except for other types of games i've made in game maker...
  8. Binsk

    Asset - Scripts UBG 3D↔2D Translator

    Who would have thought that clicking on something in 3D is such a pain? Well, let my free extension fix that for you. Download the extension through the marketplace or my store. What is UBG 2D3D Translator? UBG 2D3D Translator is a redesign of my extremely old Mouse 3D Interaction extension...
  9. bsabiston

    How to block/cancel mouse event?

    I have a big menu overlay that pops up from time to time, covering my regular object-based buttons. The menu is not an object -- I detect UI touches using mouse_check_button(). Is there a way that when I detect mouse down and handle the mouse click in my menu overlay, I can then cancel the...
  10. KyleRansford

    GMS 2 Move Player Towards Mouse/Touch x, y

    Hello, I'm making a mobile game where it's played in portrait mode and the screen is auto scrolling upward with the o_player moving in a top down style movement and while I have some input methods already done, I'm trying to make an input method where when the player "touches" a part of the...
  11. FoxyOfJungle

    GMS 2 [SOLVED] How to get mouse position relative to surface area?

    The main problem: As you can see in that GIF, I can scale it so that It will always stay 1:1. But I want to zoom in and out, and this is the problem. I will explain next: I created a surface instead of using the Draw GUI event (I need to, because later I'll need to copy that created GUI...
  12. J

    GML How to check that mouse is moving?

    I think the title explains the question that I am asking pretty well. Thanks in advance to anyone that answers.
  13. TheAlmighty

    Windows Mouse action control

    Hey i'm using DnD to make a little game but came across issues with distance checking, made a little tree object and allowed the player to hold the left mouse button to chop the tree down, all works well, tree suffessfully chops just having trouble with distance what would be the best approach...
  14. Cheezeh3d

    HTML5 HTML5 draw_text_transformed not working

    Hello people. So I have been working on a school project for a while and I hit a snag with HTML5 that I can't seem to fix. I have a login screen with simple homemade text boxes, but to type in the text box you need to click on it. I've troubleshooted a lot, so I know this is the issue. I have...
  15. JasonTomLee

    HTML5 How do you prevent the page from scrolling when using the scroll-wheel ?

    Hello! I wanted to know if it was possible to prevent the page from scrolling when I use the scroll wheel inside the HTML5 game. Thanks!
  16. C

    GML Create an object to always be between player and mouse.

    Hello everyone, I've been trying to figure out how to keep an object between the mouse cursor and the player. I've been able to offset the object from the mouse cursor using: x = mouse_x - 10; but that is very static and i would like it to look as if it is rotating around the cursor when its...
  17. 2

    GMS 2 Studio 2: Finding Top Most Drawn of All Instances at Mouse Cursor on Click

    I need to make something that will return the top most instance where the mouse cursor is currently clicking. This is probably different in Studio 2, so how would I adapt the code below? It doesn't matter if the draw order is always the same, just that I can find from multiple instances at the...
  18. Cpaz

    Windows Recent runtimes break mouse_x/y

    For some reason, as of the December runtimes, the in room coordinates for the mouse seem to be very inconsistent. I remember when I first found this, I reverted back to the previous runtime from October, and the issue wasn't there. Here are some photo examples as to what I mean: Note that my...
  19. Skyler Clark

    Legacy GM Sprite Direction Point to Mouse

    So I’m making a top down game. Right now the player is just a cube, (there’s the invisible cube for the actual player input, and another visible cube drawn on top of it for the animation so it can spin) and the front of the cube spins around and looks wherever the mouse is. I’m going to be...
  20. K

    GMS 2 Odd problem with window_mouse_set and fullscreen mode

    Hi. I am experiencing an odd problem when I try to set the mouse to follow an objects positions when I have fullscreen on. It kinda follows the object, but does a poor job. The weird thing is that when I alt-tab out to different window, and then alt-tab back into game (it is still in...