collision checking

  1. I

    Legacy GM [SOLVED] Checking for Solid Objects in a Line

    Hello all I have a bit of a problem and I need a some help with it. I'll explain as well as I can. I'm currently working on a top-down shooter for fun where you can at shoot enemies over furniture and non-solid objects but not through walls and solid objects. In the game when you click (shoot)...
  2. TonyStr

    GML Dashing trough stuff is annoying

    Hey, i've got a very simple dash state that works just like my move state, but with a higher speed. The problem with a higher speed is that it teleports trough solid objects. I can use "if(!collision_line(bla,bla,bla)) {x+whatever, y+whatever}" to not teleport over objects, but i don't want to...
  3. P

    Check for Collision BETWEEN objects?

    Um... the title may be misleading. I'm not new to Gamemaker in any way. In fact, I've been using it since GM 7.0, but today I came across a problem. Does anyone know how to check if there's a solid object in between two objects? So like this: A_____________B So say those letters are objects...
  4. D

    Collision Layers (May be the wrong term)

    So basically I have an object that I have set the collision mask to cover the entire screen, because that object needs to preform an operation anytime you click somewhere on the screen. But I have icons on the screen for things like the menu and setting. I was wondering how I could make it so...
  5. RyanC

    Legacy GM Collision Question

    Hi everyone, I've been having trouble with a collision code for weeks and was wondering if I could get some help with it? The problem is that the player dies too easily. I only want the player to die if it hits a block in front but it dies even when getting shot into the floor or ceiling...
  6. D

    check which instance of a physics object, if any, is at a point

    Functions like instance_position and collision_point can are for non-physics objects and ignore fixtures (one workaround is to enable pixel-collision checking to get a processor-intensive approximation of fixture collision checking). physics_test_overlap works with physics fixtures but won't...
  7. D

    (SOLVED)How do you get the id of an instance your colliding with?

    I'm trying to make each collision with my door objects instances unique when the player collides with it so I can turn off the object being solid and pass through it, coz i'm using a collision_line check for my enemy's line of sight check and my door object is a child of my obj_solid (which...
  8. T

    Collision Help

    Is there a way to only check if the player is colliding with a certain side of an object? For instance if I want an if event to only happen when the player is on top of a block, but not if the player is hitting the side of the block.
  9. Posho

    Legacy GM Return Colliding Object's id

    I'm testing a collision between two objects and one of the objects should return the id of the other but it's not working. I've used instance_place(), instance_position(), collision_rectangle() and none are working. I know this is beginners' stuff and I've made this work in the past but it's...
  10. D

    [SOLVED]Collision System Help

    I am quite new to Game Maker and have be enjoying it tremendously! But, It seems I have hit my first large bump in the road while working on my collision. My movement system uses the built-in hspeed and vspeed variables. My goal was to make the ground slippery, to simulate walking on ice. So...
  11. L

    Legacy GM Fast collision line?

    is there a way to create a faster collision line code? if I enable it inside a while loop, my FPS go from 800 to 200.
  12. A Random Creator

    Legacy GM Collision Checking With Direction

    Hello everyone, this may be much easier then I'm making it, but I can't figure it out and I'm sure you guys can :) I am creating a car in my game using the built-in direction and speed variables; the problem is that I don't know how to do collision checking. this is my code: (the bottom is the...
  13. D

    GML [SOLVED] Collision detection not working

    Hi! I have a problem with collision checking. I have a grid based game on which every grid cell can contain only one object. I have a player and enemies. Enemies by now are not moving and the player can move only one cell at once, either horizontally or vertically. My problem here is with...
  14. J

    Windows Issue with collision checking

    Hello. I am new to forums and would be ecstatic if someone would see what is wrong with my code. I made a script for checking movement. Basically, it checks if there is a wall colliding with the player. It doesnt seem to work and i know there is some other way of doing it but can someone please...
  15. Turkish Coffee

    [SOLVED] Precise Collision Check (x,y)

    Greetings, I'm making a boss for my game and that boss launches a fireball and this fireball moves towards the coords thats given when fireball is created and the coords gets determined by creating an object on top of the player. (It just gets it :P) The problem is, I want to get a return when...
  16. F

    How to check two objects Collision

    Hi i have some code that checks to see if my player is touching a wall i have two rooms with difference walls and i need my code to check both walls The two walls are called obj_wall and obj_stone how do i do that? here is my code if keyboard_check(vk_left) { if !place_meeting(x - 5, y...
  17. L

    [Solved] Object not loading due to vertical collision code

    Hey, I'm new to gamemaker, and working on my first learn-how-this-stuff-works game. I more or less ripped my vertical collision for jumping straight from but as I wanted to put dashes into the game (including straight down), I wanted a variable which could tell me the player character's...
  18. D

    Legacy GM Help Enemy Not Shoot If There's a Wall

    Hey, Is there a code that will only let the enemy do something to the player if there isn't any solids in between the enemy and player? I'm trying to make it so the enemy can only shoot at me if there is no wall that separates us... Can't find the code for it. Thanks a lot!
  19. Image index and global variables[SOLVED]

    I'm have an issue getting variables to add or subtract during a collision. I have the collision check if the image index, of the other object, is equal to global.state and this works fine when it come to destroying the instance however when it is equal it's supposed to add to global.score and...
  20. D

    Help with Code - Collision

    As an assignment for class, we are creating a game using GM Studio and for a certain part I am required to figure out something with code but I'm really confused and the teacher won't help. Please if anyone can help The object of the game is to have a ball hit a goal to score and win, but it's...