Instance position

Explanation
Returns the id of the instance of type obj at position (x,y). When multiple instances are at that position the first is returned. obj can be an object or the keyword all. If it does not exist, the special object noone is returned.

What does "position" mean? Position is a point in the room with the same size as a pixel. If you check for instances at a position the size of the sprite of the object that does the check doesn't matter. Only the sprite of the object that is searched for matters.

''//the following will usually return false because the position ''//where the check is made is at the top of the sprite+1 and not ''//under the sprite. ''//To make this return true you could make the y-origin of the ''//sprite the height of the sprite -1. ''//Why -1? Because the 0 is at the top, not 1. amIStandingOnSomething = instance_position(x,y+1,obj_ground); if (amIStandingOnSomething==false) y+=1