instance_position

  1. D

    GML How instance_position really works

    I am making a minimalistic puzzle game with hexagons. To check the nearest objects I am using instance_position. Searching a lot on web and forums I did not get enough information on how this function really works. So I decided to create a simple example to understand it and share with others...
  2. K

    Windows [Solved] How do I find an instance I have not collided with?

    GMS2 v 2.1.5.332 I am trying to make a feature where the player character can grab a solid object above them, and if it is moving the player will move with it. my code never lets the player collide with a solid object, I have been trying to get the object using instance_position, but it never...
  3. D

    Instance_position checks self

    So I'm currently working on a game with an object called obj_bolt in it that checks for obj_gate right in front of it using instance_position(x-64,y,obj_gate). However, obj_bolt is a child of obj_gate, so whenever I try to get the id of the gate object, obj_bolt will return it's own id. (Pretty...
  4. D

    GameMaker instance_position(xLocation,yLocation,all); returning 100099

    For some reason instance_position(xLocation,yLocation,all) is returning 100099 instead of -4 (or noone) like it should. It appears that the first time the code is run it returns -4. However, the second time it returns 100099 which is not the ID of any object and causes issues further down the...
  5. DukeSoft

    Legacy GM instance_place question

    Hi guys, I'm trying to get my player object to play different footstep sounds based on what he's walking on. The ground exists out of objects (big, round, shapes) and they _can_ overlap. Now the problem is that when I have 2 circles (1 grass, 1 stone), and they overlap, it seems like...
  6. K

    Check if object exists at position

    I'd figure that this is a relatively simple question, however, I have yet to find an answer. Note, I've already tried using instance_place, however, it returns the instance id instead of true or false. Short question: How can I see if obj exists at x, y, and if it does, return true? Long...
Top