place_meeting

  1. Sargonnas

    [Solved] place_meeting point detections not functioning

    Hello! First post here, I apologize of I'm too long-winded or don't know what pertinent information to give. I am not a programmer by nature. I've followed Shaun Spaulding's complete platformer tutorial as a primer, so if some of his variables look familiar that's why. I've been chewing on...
  2. Suzaku

    GMS 2 Check colision between 2 specified objects

    I know that the place_meeting function only checks for colision between a specified object AND the object who called the function. I wonder if there is a function that does the same thing but using 2 specified objects in the parameters, this way I can check for colision from another object not...
  3. Y

    GML If obj.A is having collision with multiple instances of obj.B at same x&y location, single one out

    Hello community, Here's an issue I can't seem to figure out after searching for a while. I gather that this issue could be solved with an instance function which calls for a unique id but I can't wrap my head around it, here's the details: In a physics world "obj.A" represents a hand, a hand...
  4. D

    Collision Event not working

    I made a collision event with another objcet but it doesnt work. The strange thing is that it does work with place_meeting. Working: http://prntscr.com/m6rclg Not working: http://prntscr.com/m6rcqi The o_hitbox contains a sprite with the standard collision mask, and the collision event is on...
  5. Y

    GML (SOLVED) While using draw_sprite_ext to upscale sprites, bounding boxes do not scale along.

    Hello community, I hope the picture speaks for itself: to keep the texture pages small and optimal I decided to upscale every sprite by a factor of 3, so I can make the game 1080p and work in high resolutions while keeping a pixelated look and feel. My game takes place in a physics world but...
  6. Robzoid

    collision event vs place_meeting()

    I'm working on a 2D platformer and am in the process of converting my player object's step event from a bunch of giant, messy if statements to a state machine. I'm trying to decide if I should leave my enemy collision event as is or remove it and replace it with this: if place_meeting(x, y...
  7. kpenrose92

    how to access the "other" instance in place_meeting?

    hello! i am trying to prevent my platformer player from getting stuck on the corner of obj_solid. i am trying to do an 'if' statement inside of place_meeting() with obj_solid, to check my player's position within obj_solid.bbox for vertical collision . code looks like this --> if...
  8. Jmarlin3

    Help with objects touching - Disappearing floor

    The idea is that when the player is touching the floor, it turns red. However, when there are multiple floors, so if the player isn't touching it, I will go away. Code for floor: Step Event if !place_meeting(x,y,obj_player){ instance_create_layer(x,y,4,obj_redfloor)...
  9. I

    Complete If Statement Wont Run In Some Objects

    Okay, so im using this EXACT set of code in 3 different objects, however it only runs completely through in the object txt_bot_name. in the other 2 objects, (names are really irrelevant as they are never referenced in any code yet), they still run the first line of the outer-most if statement...
  10. R

    When something works and you don't know why GM2

    Hi team, well I have this object that is a enemy, for now I just want it to move left and right , each time its one pixel away from a wall it will invert it's velocity to have a negative value and viceversa On the Create event I have: objXVelocity = 5; On the Step event I have : /*When...
  11. S

    (GM8.1) Making character react on conveyor belts correctly.

    A little bit of explanation before. I have my character who goes right automatically but he can go on Conveyor Belts that makes the character slide slowly to the direction it is going. I have four variables (left,right,up & down) that are used to handle this (if up is on 1, all character's...
  12. L

    I need help with a building blocks thing

    so im testing a building method and im checking for the snap to grid, free space, and if connected to a block on all sides so u cant create one in thin air i have the free space and the snap to grid but i cant figure out the last one and suggetions? here is my code i will underline what i need...
  13. M

    Legacy GM [Solved] Top down shooter enemy wont turn 90 degrees at walls

    I am attempting to make a system whereby my enemy turns 90 degrees in the direction that there is no block to collide with. The code: if place_meeting(x+lengthdir_x(turnradius,direction),y+lengthdir_y(turnradius,direction),obj_block) { direction += 90; if...
  14. P

    [SOLVED] place_meeting for 2 of the same object

    Assuming there is no premade function to do so: How would I set a variable to true any time an object is touching two of an object, and not just one. An example use of this would be: if a bounding box bordering my character were to be touching both the ground and a platform (both with parent...
  15. Y

    Legacy GM Collision using virtual sticks

    So I'm currently using the standard speed function in gamemaker to make my player move towards a direction using this code: if(!place_meeting(x, y, Obj_Controller3)){ speed = global.spd } however this does nothing the code for the direction stick is this: if(!global.Pausing){...
  16. P

    collision of children

    Hey guys I've been having ALOT of trouble with parents and childrens and stuff Basically I want the children of obj_floating to have an array list of children of obj_float that are touching it obj_float step: if place_meeting(x,y,obj_floating) { a = instance_place(x,y,obj_floating)...
  17. I

    using with() with a object I'm colliding with.

    hi, thanks for viewing my thread. I made in my game a kind of poison puddle and i want that every time it collides with an object, if the object's variable is_character = true it will poison him. so here is what i got so far: if (place_meeting(x,y,all)) { if(other.is_char) {...
  18. V

    place_meeting doesn't seen to work. Could you help?

    Hi! I'm making a Pac-Man-like game and I wanted to recreate the Pac-Man maze, but I wanted to make it easier for myself, so that when I change the wall placement it would automatically change the way the wall looks. My pac-man sprite as well as my wall sprites are 16px*16px. Here are the wall...
  19. B

    GML Problem with OR logic

    Hi everybody. I'm nees some help wih this code: _apo = obj_control.active_player_obj; if (place_meeting (x, y + 32, _apo) || place_meeting (x + 32, y, _apo)) { // do stuff } if !(place_meeting (x, y + 32, _apo) || place_meeting (x + 32, y, _apo)) { if...
  20. RyanC

    Legacy GM Movement code optimization ideas?

    Hi everyone, does anyone have any ideas how this code can be optimized, as it's eating up 30% off my game time. /// movement and collsion alarm[2] = 1 // step frequency // gravity if ! place_meeting(x,y+grav,obj_floor) { gravity = grav } else { gravity = 0 vspeed = 0 if...
Top