collision

  1. Storm1208

    GMS 2.3+ Horizontal and Vertical Collision No Longer Working After Being Converted to Scripts

    I'm working on a finite state machine implementation for a platforming character. I initially coded the character normally (i.e. not using a state machine approach) but am now beginning to convert what I had previously implemented into a state machine format. To aid in readability, each...
  2. R

    SOLVED Collisions not working

    I have a player object and an invisible wall object, both of which are set to solid, but for some reason the player can just walk through the walls. It can also walk on top of them, and if it is in a wall it can't jump. The code is below, any help would be appreciated. (code from a step...
  3. Kezarus

    Spine bounding box and image scale

    Hi everyone! I need my bounding box to be a fixed size (256x256) for a combat grid system. I did that to everything but the characters. Now I'm having a problem with my Line of Sight system. I use image_xscale and image_yscale a lot on an object that uses a sprite that is a Spine skeleton. If...
  4. R

    How can I destroy an object when it collides

    ¿Cómo puedo hacer que cuando la bala golpee el bloque se destruya automáticamente en Game Maker Studio 2?
  5. N

    SOLVED Player object stops falling if i hold left or right next to a collision object.

    Like i said above. i tried to look up solutions, or different tutorials on how to do movespeed. I've been scratching my skull all day, and thought i'd ask here, since i've gotten alot of help here before. i apologize if I'm unclear of what's the issue. here is the code: #region //Get player...
  6. M

    Windows COLLISION PROBLEM (HELP)

    Hi, I´m making a plataformer game and in my character I put this in the Step event: var hor = keyboard_check (vk_right) - keyboard_check (vk_left) if (hor != 0) { if (place_free(x + hor * 2,y)) { x += hor * 4; } image_xscale = hor * 2; sprite_index = sPersonajeWalk; } else {...
  7. M

    Drag And Drop How can I make two objects repel each other?

    So I'm trying to make a racing game with DnD and i'm trying to make the two cars repel each other when they collide, but i'm pretty new to GMS. I've tried several things but I just don't seem to be able to do it. Please help. The attached picture is how it looks...
  8. flykidsblue1

    Messed up collisions with distortion shader

    Hey everyone! I am working on a small side project that has to do with an operatin system knock off. I am using shaders to give the game a vintage look like the old macintosh screens. I am using a distortion shader to give that "fish eye" effect to the screen, however I noticed that applying...
  9. N

    SOLVED Trying to "Stop" a Camera From Going to Certain Parts of a Room

    Hi all, I'm currently working on a 2D game with a smooth moving camera that follows the player. The camera itself works fine and using clamp() I've managed to keep it only moving within the confines of the room it's placed in. I want to be able to control where the camera goes more precisely...
  10. D

    SOLVED Collision not being detected

    Hello, i've been trying to use this method for checking the collisions on my game (Basically a 2D plataformer), but for some reason it's not working. movingh = hspeed; movingv = vspeed; if (place_meeting(x+movingh, y, obj_Floor)) { while (!place_meeting(x+sign(movingh)...
  11. I

    SOLVED Problems with collisions at the edge (2D platformer)

    Hi everyone, I need help with a somehow specific problem. I'm working in a 2D pixel platformer and obviously one of the first things that I implemented was collisions with platforms. To be honest collisions aren't my forte so when I found this problem I ignore it at first but is been a couple...
  12. T

    GMS 2.3+ Moving Platforms Issue [Help needed]

    https://maddythorson.medium.com/celeste-and-towerfall-physics-d24bd2ae0fc5 So I've implemented moving platforms into my game, modeled after this article, and for the most part they work as I expect them to. However, sometimes when I land on them it seems to push/teleport me out of it. The...
  13. FullCup

    SOLVED collision_rectangle working without mask...

    I put a mask_index of an object a empty sprite, so that in some conditions it doesn't collide with the object. The place_meeting works, when the mask_index is off it will not collide (what i want). ///It works //Mask off with (argument0) {if (condition) mask_index = spr_empty;}...
  14. FullCup

    GML Collision with specific instances of an object

    I'd like to put an instance of an object into a "collidable group" in some cases. For example: If the player collides with a "water coin" INSIDE the water, he CAN collect it (just an example). My first thought was to change the parent just before the collision check and then return to the...
  15. Reddoka

    SOLVED Player collision script doesn't work

    I coded it like the tutorial, but maybe of the different version, it's not working. It said that there is an unnecessary expression (-1) used as a statement, but if I remove the (-1) the tiles don't work propably (the _collision doesn't seem to work too). Thanks for helping, I really appreciate...
  16. Genesys Generation

    GMS 2 How to avoid the collision of objects that move along a path?

    There are 2 cars (same object) that go through a circuit: Consider that the white part is an intention that they avoid (it would be as if it were a wall). The black part (circuit) would be just illustrative, it is not an object. In the program the room looks like this: Green ->...
  17. I

    Need help with collisions

    Hi, i just started using game maker, very uneducated in it but im trying to learn, and follow along with a tutorial for a game i want to make myself (using the tutorial to learn). I have followed everything done in this video ( ) and as far as im aware, my scripts are identical to his, but for...
  18. T

    GMS 2.3+ Need Advice for Movement Code

    So the past couple months I've been spending what time and patience I could muster trying to figure out how I should handle my movement, specifically in regards to real numbers, angles and collisions. Ideally I would like to program a collision system that would enable me to have real value or...
  19. M

    I can't get collision working on DND

    I have watched alot of DND collision turtorials but it still doesn't, work i can still walk trough objects and get no collisions. Can sombody please help me?
  20. foreverisbetter

    GMS 2.3+ [SOLVED] simple collision with rotated sprite not working

    Hello, surprisingly I didn't find the question already asked here in the forum: why is an instance running one pixel into a wall to its left when it rotated around 180° ? The sprite is 16x16 pixels, the origin is the middle center and its collision is set to be precise. the movement code is...
Top