place_meeting

  1. R

    GML Need help with place_meeting

    while (place_meeting(x+(move*vitesse),y,oWall)) {x+=sign(move)} is supposed to move the player as close as possible to the wall if there is a collision between him and oWall, but it stops the player a few pixel away from oWall. Jon's reply fixed my issue but I want to understand what went wrong...
  2. M

    Legacy GM Auto-tile system

    Hey guys, so I've been attempting to make an auto tile system based off of this video: It worked, up until I had one block which stuck out a little more than the others, with a larger horizontal collision box. This completely ruined the collisions that were being checked. Any ideas on how to...
  3. S

    GMS 2 problems accessing variables of collided object

    I'm trying to access the y position of an object the player is colliding with, this code was me testing things, so I'm just trying to get the id of the collided object here: if place_meeting(x, y+vspeed_, o_slope_r){ show_debug_message(other.id); } For some reason, "other" is the player...
  4. Y

    doesn't detect place_meeting

    so i'm using this script to check for the Obj_Stone. if (keyboard_check_pressed(vk_up) && Jumping == false){ physics_apply_impulse(x, y, 0, -500) Jumping = true show_debug_message("true") } if (place_meeting(x,y+1, Obj_Stone) && !place_meeting(x+1,y, Obj_Stone)){ Jumping =...
  5. B

    [SOLVED] Help with Enemy Shooting

    Hi, Currently my enemies have an aggression system where when they spawn, they're set to a random aggression. With this system I have it set up where some enemies attack the player or another enemy. My issue is that if I add a "place_meeting" event with the bullet(weapon) that the enemy shoots...
  6. A

    GML Check collision of two objests from a third object

    Is there a way to check the collision of two objects from a third? I've been trying to find an answer but to no avail. My code can be seen below. So I want to check the collision of obj_green_item and obj_player from obj_room2_control. Is there something I am misuderstanding? (I've also tried...
  7. L

    Legacy GM [SOLVED] Problem with Collisions / place_meeting()

    I have a villager object which uses mp_potential_step() to navigate between objects (such as trees). When it reaches the tree in question, I use place_meeting() to change the villager's behaviour. In order to make this work, I have the villager set to solid and the trees not set to solid...
  8. L

    [SOLVED] Solid Objects Overlapping

    I have various objects in my game that are marked as solid and their sprites use precise collision checking. However, when moving around on screen, these objects still overlap one another. Am I missing something? Also, when I generate these objects, I place them at random coordinates on the...
  9. V

    [noob question]Collision problem

    Hello, so in my platformer i have my character pushed back when shooting a machine gun if key_right_shoot = true and !place_meeting(x+1,y,obj_wall) x -= 3; if key_left_shoot = true and !place_meeting(x-1,y,obj_wall) x += 3; With this player gets stuck in the wall for just a few pixels, ive...
  10. S

    Collision help

    Hi, Ive set up movement and need help with collision at a wall. Im new to this and would appreciate the help, thanks! the error im getting is: "In Script scr_player_step at line 59 : malformed if statement" Im trying to use place_meeting to detect when the player touches a wall and set...
  11. S

    Weird place_meeting glitch

    I want to place a block called obj_line in my level by left pressing, but before it gets created I want to check if there is any other instances already at that place. To do this I use the following code in the Global left pressed event: if place_meeting(mouse_x,mouse_y,obj_line) == false{...
  12. B

    Legacy GM Sprite sometimes floats one pixel from the ground

    I ve been doing this game for some months, and the colisions were fine. My character used to jump and fall perfectly, without floating or passing trough the ground pixels. However after some time i realized it is sometimes (only sometimes) walking and standing one pixel over the ground. In my...
  13. E

    Strange thing in Place_meeting

    Hi guys i have a question. I have this code in the step event of my player. if keyboard_check(vk_right) and !place_meeting(x+5,y,obj_wall){ x += 5; } if keyboard_check(vk_left) and !place_meeting(x-5,y,obj_wall){ x -= 5; } if keyboard_check(vk_down) and !place_meeting(x,y+5,obj_wall){...
  14. mafon2

    Legacy GM To address one of the many

    Ok, I'm sure it's trivial thing many of you struggled with. I'd like to make a block that crumbles, when contacting fallin player or special block. Here's the code: if (place_meeting(x,y-Movable_block.speedY,Movable_block)) { instance_destroy(); } As you can see, it affects all of...
  15. Starturbo

    Legacy GM Should I use collision_rectangle for platformer collisions?

    Hi, I'm making a platform game in GameMaker: Studio, and I'm wondering if I should even bother trying to use collision_rectangle. Someone I talk to, who is more experienced than I am, recommended me to use it for collisions. I know some other people are also starting to use collision_rectangle...
  16. A

    Mining Stone

    I'm looking for a way. If I hit "Q" while playing as an object then it checks if theres is a special object infront of me, atleast 100 pixels away. If there is then destroy that object and give the player I'm plaing "a variable" "var += 3" etc. If anyone is able to help me, please do. Thanks...
Top