• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

instance_position

  1. 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...
  2. Drepple

    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...
  3. D

    GMS 2 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...
  4. 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...
  5. 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