• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

mouse

  1. T

    Need help with Triple Shot [SOLVED]

    Hi, I'm programming a top down shooter right now where the bullets fire towards the direction of the mouse. I'm programming a Triple Shot upgrade right now, so it fires one bullet straight towards the mouse, and two more 45 degrees above and below the middle shot (or 45 degrees right and left if...
  2. N

    [SOLVED] How to block your mouse in the screen?

    Hi guys! I'm searching for days on how to block my mouse in my game window because i play on multiple screen, i found this function: window_mouse_set(clamp(window_mouse_get_x(), 0, window_get_width()), clamp(window_mouse_get_y(), 0, window_get_height())); it works fine but if i move my mouse...
  3. Weastøne Entertainment

    Crazy collisions [SOLVED]

    Hello there!, I had a pause menu (which was created following HeartBeast's instructions) that worked with the up and down arrow keys. I implemented mouse input and I wanted to update the code, so instead of navigating with the keys, I would be navigating with the mouse pointer. This is the code...
  4. W

    Legacy GM Dashing towards the mouse

    Hello! I've been searching quite a bit for a situation like this but I still can't seem to figure this out. What I've trying to accomplish is a short range dash towards the mouse in a 2D platformer. I've been able to pull off a short blink with a maximum range of 300 towards the mouse which was...
  5. J

    GameMaker Mouse, camera, viewport and view.

    My project has only one room. I've set the viewport of that room width and height to 768 x 1024. Then i set the camera of that viewport to 384 x 512. In this way everything is displayed 2x larger. I don't understand why the built_in variable view_wport[0] return the same value as...
  6. W

    Change mouse cursor when over specific object[SOLVED]

    Looked for this on forums but couldn't find the answer. I'd like the mouse cursor to change to a hand when hovering over an object the player can interact with. How do I accomplish this? for code examples the mouse sprite is called "spr_mousehand" and the object in question is called...
  7. T

    Help with directions

    How do I make the following code work the exact same way except for a mouse (Position from player's x and y)? xfacing = sign(gamepad_axis_value(0,gp_axisrh)); yfacing = sign(gamepad_axis_value(0,gp_axisrv)); facing = floor((point_direction(0,0,xfacing,yfacing))/45); if facing == 8 dir = facing...
  8. Z

    *SOLVED* Too small screen resolution messes up mouse

    Note: I'm using GM 6.1. I know it's outdated, but because I started this game project using 6.1, I'm also going to finish it with it. I started this project many years ago, so I have no idea why made this decision, but the size of the background/game room is 1080x540 px. The computer I have GM...
  9. P

    GML Make a not clickable Object

    Hi, I'm making a mouse-click controlled game, and I want the player to not be able to click on certaine spots because they are not walkable. I think I may have an idea how to start that in the Mouseclick object (it creates a little arrow that shows where the player goes when pressing the LMB...
  10. P

    Sprite changing when movement problem

    Hi, I have a little problem with changing the sprite when the object moves and changes direction. the sprite changes to the walk sprite when moving and back to the static sprite when standing and also changes to the sprite for the right direction. But it sometimes slides a bit or switches to...
  11. A

    Legacy GM Spinning the mouse around the player lags the whole game

    The game I am making is a top down shooter, where the player sprite rotates to the mouse position. Whenever I spin the mouse quickly around the player, the game lags. Here's what it looks like: I've tried commenting out the code that rotates the player, but still no luck. I've also tried...
  12. K

    problem with php and grids

    Hey, this is my first post on this forum. Iam making some prototype of turn based game, with some data save into database trought php files. I have some experience with php and data bases, so this isnt a issue here. Problem which i have is in GM. I post 2 jpg, screens from GM with scrpits from...
  13. N

    Limit rotation speed with image_angle = point_direction(,,,)

    Hello! Does anyone know a way to limit the rotation speed? In the players step even I just have this code to handle rotation. image_angle = point_direction(x, y, mouse_x, mouse_y); Thanks in advance!
  14. N

    shoot per 10 frames instead of each frame

    Hello! I am wanting to find a way to shoot with 'Mouse Left Button action' rather than with the 'Left Button Pressed' action, as I'd rather not have to click a bunch of times. With 'Mouse Left Button action' it seems that it fires each frame. I would like to fire say.. every 3 frames instead...
  15. D

    Legacy GM Help Replacing Mouse Movement with Xbox Right Stick

    Hey, I want to add Xbox One controller support, but I can't find anything on how to get the right thumbstick movement to replace the mouse x and y movement. My game is a shooter and right now I have a reticle showing where the mouse is pointing. I want to replace the mouse with the controller...
  16. U

    HTML5 Need help detecting when the mouse leaves the canvas area

    This is probably the last post I'll do in the subject. I figure the only reason I haven't been responded to before is because I'm not defining the problem well enough or I'm not clear enough. So basically in my breakout clone I'm making the player drag the paddle left or right like a scroll...
  17. U

    HTML5 Mouse leaving canvas area in html5

    I've implemented some code that allows me to drag the paddle in my breakout game let or right sort of like a scroll bar. Only if I hold down the button drag it outside the canvas area, let go of the button while outside of the canvas area, I then move back into the canvas, and the mouse...
  18. U

    Dragging an object with the mouse

    I basically want to drag the paddle in my breakout clone with the mouse. The way I have it now, it will jump or move to the position where the center of the paddle is at the mouse position. It means if you click on the left or right edge it will move to where it's in the middle of the paddle...
  19. R

    Destroy an object by clicking on it, help please

    Hello i want to destroy an object by clicking on it so i have create a object call : obj_tap and create a step event and here my code : if mouse_check_button_released(mb_left) && mouse_x == obj_tap.x && mouse_y == obj_tap.y { instance_destroy(); } When i click on the object it do nothing :/
  20. U

    Legacy GM Making an object follow the mouse

    I'm making a breakout style game. Except I want to move the paddle by essentially dragging in. What I mean by that is I click on the paddle and while holding down on the left mouse button it will move to the mouse's position. The reason I want that is because when I put it on android, from...
Top