place_meeting

  1. NovemberTender

    SOLVED Player object stops falling if i hold left or right next to a collision object.

    Like i said above. i tried to look up solutions, or different tutorials on how to do movespeed. I've been scratching my skull all day, and thought i'd ask here, since i've gotten alot of help here before. i apologize if I'm unclear of what's the issue. here is the code: #region //Get player...
  2. FullCup

    SOLVED collision_rectangle working without mask...

    I put a mask_index of an object a empty sprite, so that in some conditions it doesn't collide with the object. The place_meeting works, when the mask_index is off it will not collide (what i want). ///It works //Mask off with (argument0) {if (condition) mask_index = spr_empty;}...
  3. S

    Place_meeting / Position_meeting not working

    I have written this simple code that just checks if you're hovering over the object and if you press mb_left it does something. But it doesn't seem to even acknowledge that I'm hovering over the object. I have tried using "place_meeting(mouse_x, mouse_y, self)" and "position_meeting(mouse_x...
  4. E

    GMS 2.3+ Objects not meeting

    Hello, I'm still discovering GMS, and I keep having issues, and questions about some behavior. šŸ˜… Here is what brings me this time : The script in the left is used by the tree, and the Object1 is that character. Because I think it's hugely link, I add that i put "depth = -y" in both of the...
  5. M

    Walls gliding with gyroscope

    Hello! I try to make gliding at walls with this code: if place_meeting(x+1*sign(hspeed),y,oWall) { while !place_meeting(x+1*sign(hspeed),y,oWall) { vspeed = (device_get_tilt_x() * hsp); } vspeed=0 } if...
  6. Writerstix77

    Player getting stuck on moving enemy

    I have an enemy that moves towards a player when near. When close enough to the player it animates a swinging axe. If the player and the enemy are colliding and the enemy is drawing frames 4, 5, and 6 (of 8 axe-swinging animation frames), the member takes damage. Sometime, the player will...
  7. M

    Step event collision doesn't work

    So in my game, I can't use Collision Event for obj_enemy because obj_enemy needs to be marked as Solid, and that will stop it upon any collision. So I put the following in Step event to work around it: if place_meeting(x,y,obj_limit){ if escape=false{ direction = image_angle+180 } } The idea...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. M

    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...
  19. M

    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?
  20. 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...
Top