• 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!

collision checking

  1. D

    Legacy GM Errors with instance_place and is_undefined

    I am currently getting errors stating that "target.type not set before reading" inside an is_undefined statement, and instance stored under target should not have even been read. The relevant code used is this: target = check_hit_instance(x,y); if(target != noone &&...
  2. M

    GML Expanding Circular Collisionbox

    I need a circular collisionbox that can expand or shrink with a (variable) number value. I've tried: //STEP EVENT cor_radius = random_range(cor_rMin,cor_rMax); //randomize core size rad_radius = random_range(rad_rMin,rad_rMax); //randomize radiation zone size if...
  3. J

    GameMaker Collision Problems

    v2.1.4.285 I am using a basic collision system(place_meeting) for my 2d platformer. But due to my tileset having to be snapped to the grid(middle centre) for edges to of tile to show. and I use a !visible object that acts as walls and floor. but I have to use 4 different objects to cover the...
  4. L

    Legacy GM Sentry Enemy Coding Help

    I'm working on a stealth game and revising some mechanics. I have a sentry enemy that used to have a constant, swiveling line of sight. I'm trying to change it at the moment so it instead lies "asleep" for a few seconds, "blinks awake" for a few seconds during which it can detect the player...
  5. D

    Legacy GM Check for collision between two other objects

    Hello. Is it possible to have an object check for collision between two other objects and have that collision affect itself? The way how I'd use it is simple. I have a camera object that snaps to the player's position based on an 800x608 grid. I want it to pause any movement when the player is...
  6. S

    GameMaker Multiple collisions with collision line[SOLVED]

    I'm having trouble with multiple collisions using perfect collisions. The problem that occurs with: //Single collision but only performs the damage state once var cc = collision_line(x, y, kx, ky, obj_elifeparent, false, true); if (cc && can_hit == true){ cc.hp -=damage...
  7. E

    Tilebased slope collision

    Hey guys, I am curently programming a 2d platformer. For collision detection I am using tile based collision. The problem iam facing at the moment is slope collision with upsidedown slopes. i somtimes clip into them and i dont know why... :/ maybe someone could help me with that. Here is my...
  8. Z

    GML Can you spot a mistake in this collision checking?

    Hi! I have a problem with this code, and just wanted to check if you guys can see something wrong with it. This game was made with umm... GM6 I think. And it's like 80% finished so I'm not going to change to a newer version for this game. There is an airplane here that can go between LA and...
  9. K

    Collide with object a certain distance.

    Good day and Excuse me for my English. I would like you to help me with a problem I have when colliding with a certain object. I have a parent object that is par_wall that has as children the object obj_wall. data: -obj_player: dimensions = 32 x 64 px, origin = 16 x 63, botton center, collision...
  10. B

    Activating instances only on the current platform

    Hello everyone! Hit a bit of a wall with the game Im making. Right now I have it so only the section of ground the player is currently standing on is visible (this is an isometric game), all others are invisible. Im using a collision event to do this with a: Visible = other.visible Code in...
  11. B

    How to: Grid-Based Enemy-on-Enemy Collision?

    Hello, I've been following along with HeartBeast's random level generation tutorials, and completed all 7 of them. Afterwards, I adjusted the code to have grid-based movement, so my character moves in a 32 x 32 grid. I want to make a roguelike. The issue I'm running into is how enemies should...
  12. K

    Legacy GM My Collision Mask won't work??

    Pretty sure I'm just brain farting here, I'm wondering why my Collision Mask isn't working. I have Precise Collision Checking enabled. Here's what I have for the Mask Properties: In the room using this wall collision mask, I have an object with the creation code of: 'sprite_index =...
  13. TheOnlyWRT

    Collision code using GML functions

    Hello! So, working on an isometric terrain generation project, i have been trying to make it so that the user can click on one of the four corners of the tile, or in the center, in order to manipulate the tile. I am using the point_in_triangle function to detect the mouse location within the...
  14. M

    GML Mass collision between objects

    Hello Community, I struggle at the collision between for example a horde zombies. If i have like 15 objects on the "same" spot, they stack inside each other and can't move anymore. Have anyone expierience with so many collisions at once ? It is great if they are "slide" off each other. Thank...
  15. P

    Windows triangle wall collision

    I'm try to figure out how to do collision checking between a triangle shaped object,thats constantly changing its image angle(image_angle).Do you have any useful code I could use (studio 1.4).I'm useing h&vspeed for movement(If that matters).
  16. M

    Windows [Solved ] Help with a Collision "Exception"

    Hello, I have only picked up Gamemaker yesterday and I started to make my own game, which is basically a Top-Down, Puzzle like game. This includes the Player being able to throw Knives in order to kill guards, however I am struggling with a certain feature that has to do with the Knife. I now...
  17. Turkish Coffee

    Legacy GM Collision checking with collision_rectangle or position_meeting?

    Hey, A quick litte question, Should I check collision with collision_rectangle() and draw the green color with draw_rectangle_colour() that shows if this place is empty or not, or should I have a colored object and check collision with place_meeting() and change the image_index of that object...
  18. M

    Help with Collision Masks

    Hello all, I need some help with Collision Masks. I created a sprite and converted it into a tileset. I then placed the mask around the borders of my map to create a collision mask. My problem is when I move my Character (object) to test, it interacts with the mask but seems to act funny and...
  19. D

    Legacy GM Collision with whole object

    HI everbody, how to set that collision is true only if whole object "cover" another object, not just part? It is dragable game, I drag an object and drop it above another, and I want to detect collision only if whole object is on another one, not just part. Thank you my GM friends :)
  20. L

    GML Swarm Optimization & Collisions?

    I'm currently developing a swarm that chases you around the map and just have a few questions regarding optimization and collisions which don't use the built in speed variables. Optimization Each alien member uses a position, steering, and velocity vector to update its x and y position. I plan...
Top