place_meeting

  1. D

    SOLVED Preventing layered objects?

    My understanding is that GMS 1 had a 'delete underlying' toggle that would prevent you from accidentally stacking objects on top of each other when placing them in the room. However, it seems this was tossed out in GMS 2. I found an old topic on the subject suggesting using this line of code...
  2. MartinK12

    SOLVED Collision of player with enemies and bullets (in code) – inside obj_player or those objects - pros and cons, optimization?

    Game with a lot of bullets and enemies, ie. platformer, bullet hell, etc. When player gets hit he has immunity for 2 sec. Where is better to put collision checks between player and enemies plus bullets? I do those checks in end step. 1. If put those checks inside enemies and bullets then each...
  3. MatteKudasai

    SOLVED Problems with Place_meeting on 1.4

    I'm trying to make my character mount on a horse when I press "K" close to it. The way I would able to do is making another object, the character on the horse, and create it when I press the button, while destroy the char off the horse, and it worked but I'm trying to limitate to just when is...
  4. S

    SOLVED place_meeting collision detection flip-flopping between true and false, with the same value

    I'm working on a little top-down RPG kinda game. And am making a path-finding system for npc's. Cutting the fluff, i'm having trouble with some collision detection. I was debugging for several hours until i narrowed my problem down to this. What you're looking at here. Is a path generated with...
  5. oldnoob

    Quick question about PLACE_MEETING() [RESOLVED]

    Dear all, May I just verify how place_meeting works please (I haven't found a definitive answer online). Assuming a player's sprite (32x32) origin is top-left and you check for place_meeting(x,y+1,obj_block), does it just check the pixel below obj_player (at Y 33) or all pixels from 1-33 (not...
  6. L

    GML Object goes 1 pixel too far with anti-gravity

    I've tried using my normal method of gravity and vertical collision and making it work for anti-gravity, or in other words, falling upwards and not downwards. // Create Event vsp = 0; grv = 0.1; jumpsp = -2; // jump_delay used for staying on the ground 50 frames before jumping again...
  7. yashamatt

    GMS 2 [Solved] One Way platforms sometimes work and sometimes don't

    I have basic movement and collision with solids set up, but when I try to set up my one-way platforms I will only be able to interact with whatever one-way platforms that have a lower y-axis than the obj_player when the room is created. If I decrease the spawn y-axis of the obj_player then load...
  8. Y

    GML using place_meeting() in combination with a path to call its index

    Hello community, I am looking to program the following: - When object instance "A" crosses the position of a path in the room, recognize it and give me its index. The idea I have is to put objects (platforms) on top of a Path that I created within the room editor so it will recognize said...
  9. D

    place_meeting trouble

    I'm making a basic space shooter arcade game and instead of using the built-in collision event I'm using place_meeting. Since this would have to be in the step event and the step event runs every frame I made a boolean variable named hit that will become true once an enemy hits the player's...
  10. Roobicorn

    GMS 2 Precise collisions (2 place_meeting statements cancelling each other out)

    I'm working on a platformer in which involves the player being able to jump up through ledges, landing on top of them, or, if they can reach the ledge but can't make it over, they can grab the ledge and hang from it. I'm expanding on some of the code from Shaun Spalding's Platformer tutorial...
  11. Matthew Imamura

    what is the difference between using Place_meeting or the built in collision event?

    When I watch tutorials online, most of them uses the "Place_meeting" variable. but I saw a built in collision when creating events so I experimented with that. they both seem to do the same thing. I was wondering if there was a difference between the two and in what situation will one be better...
  12. MoncefFennich DZDev

    GMS 2 How Do I Make Enemy Never Stuck

    How Do I Make Enemy Never Stuck with Any Other Enemy Or Object When He Follow You. The Very Hard Think Is Avoid Enemy instance to another enemy instance. Any Advices?
  13. Michael Stearns

    Legacy GM Gravity Flip with Jump-through platforms

    Hello! I am working on a platformer using the excellent Moving Platforms package by ZBG as a basis. I think I have a pretty good understanding of how it works and have made a lot of modifications. But, I've hit a wall when I tried to add a Gravity Flip mechanic. It works great on regular solid...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top