collision checking

  1. player_2

    GMS 2 [SOLVED] Find the edge of the platform in 2d platformer

    Hi guys! I am newbie and I need your help. Recently I started making a game in GMS2 and ran into a couple of questions that I couldn’t find answers to: 1.There is an object that moves along the platform, reaches the edge and turns around in the opposite direction. it works like this: var hspd =...
  2. G

    GML collision checking using binary?

    Hi Fledgeling developer here! I'm just starting to learn Gamemaker studio 2 but I am interested in learning how to optimize my games from the getgo! I have been reading the basic stuff in the manual about binary operations and bitwise operations (bitwise and, or, not and EOR). As the manual...
  3. T

    Issue with enemies getting stuck in ground

    Working on a simple 2d platformer, with a mechanic where enemies can be grappled. So far all going well, though I made it so that if while the player is grappling an enemy and they take a hit from another enemy, they're supposed to be knocked back and release the enemy. With how this currently...
  4. Raskovia

    GML Change character control when colliding with an invisible object

    Hey! I´ve been having a headache meanwhile i was trying to resolve the code to do this: the videogame am making is told in the view of the three principal characters, despite the lineal story. I cant make the player object change their sprites (because they have a lot) and also, the mecanics...
  5. Wile94

    Legacy GM Instance_nearest - when to use it? performance impact?

    Hi, I'm working on a platformer (if you saw my posts i'm always working on a platformer :rolleyes:). Currently I'm looking the best way to perform some collisions without running the place_meeting and instance_place function constantly. I coded a moving platform using the next lines of code...
  6. D

    GMS 2 [Solved] How can I make collisions

    Hello! I am making a game and I was wondering how to code a collision system with that is compatible with the code for my Movement system. Any help would be greatly appreciated! hInput = keyboard_check(ord("D")) - keyboard_check(ord("A")); vInput = keyboard_check(ord("S")) -...
  7. yashamatt

    GMS 2 [Solved] How to get unstuck while in collision objects?

    So I have a beginner-style collision code set up and I either want to improve it to avoid bugs or develop some sort of work-around so that if bugs occur the player isn't perpetually stuck in a collision object. I kind of need some help brainstorming a solution. Due to dealing with a scope...
  8. O

    Player to Enemy Collision Issue

    Hello, I am currently in the process of creating an enemy AI while following a youtube tutorial. The enemy AI is a simple track the player and over take them. However, after placing a collide script onto the enemy object the enemy object still overtakes and encompasses the player rendering them...
  9. O

    Player to Object Collision Issue

    So I've recently started getting into Gamemaker Studio 2 and was following videos by a youtuber called FunBox. I ran into some problems when play testing the code. Whenever I moved the player toward an object with collision the player would eventually get stuck and would not be able to move...
  10. Wendell

    GMS 2 Finding the Exact Collision Point Between 2 Objects

    Hey guys, needing some help. How can I find the exact collision point between the fire object and the wall object? Both are separate objects and I want to make some animation on that point when the fire touches the wall. The fire rotates every step. I tried to use place_meeting and...
  11. S

    Legacy GM Collision Help

    Im relatively new to gms (1.4) so please forgive the "noobism". My issue is this: I am attempting to create a platformer. Unnecessary details asside, i have a player object and several wall objects. All wall objects share a parent object that (i think) will allow me to reference all wall...
  12. D

    Drag And Drop Destroying an Instance when Collision Stops Happening

    Hello, I'm very new to GameMaker DnD and programming in general. I'm creating an object that spawns an instance of a different object above it, but I would like the instance it creates to destroy itself once the player walks away. How would I go about this? I can only get the instance to create...
  13. F

    Legacy GM Collision detection differences in HTML5

    Hi, I'm having a lot of difficulty getting a particular collision detection to work properly, but only for HMTL5, and only when the player is colliding with the object from above. The object is a block that can be pushed in four directions, as long as it's along a rail. The player in this code...
  14. KyleRansford

    GMS 2 How to Draw a "point_in_rectangle();" Check [SOLVED]

    This question might seem a little too obvious but, I'm using a point_in_rectangle(); to check for collision when the player walks up to an NPC to start a dialog with. The problem is, the player can only activate the dialog when they are above the NPC. This is on a 4-way movement style game by...
  15. Papa Doge

    GML [Solved] Sticky bullets on nearest surface

    Hello, I'm playing around with some code to test different ways of finding the nearest collision using the collision_line function and I've created something that does what I want it to do but seems to crash the game pretty regularly. I'm down to trash this whole concept and try something...
  16. Papa Doge

    GML [SOLVED] Multi-Switch Logic is Broken

    I'm working on a test room for my game that includes objects that have active and inactive states that are toggled when the player throws a Projectile that hits a Switch in the same room. So far, I'm playing with the following objects... - Switches that toggle the states of doors and platforms...
  17. Raptor_Guy

    GMS 2 Collision Detection Issue

    This seems rather simple, but I can't figure it out. When my player is in the move state, it checks every step whether there's place_meeting(x, y-1, oSolid) && place_meeting(x, y+1, oSolid), in other words, when the player is crushed between the ground and a falling block (oSolid is a parent of...
  18. lord_berto

    GMS 2 collision function instance_position()

    how does game maker handle the collision function instance_position()? all my game objects have a parent called obj_solid ( including players and walls etc ) im trying to code a function to allow anything to push against each other. in the step event of object A i have : if...
  19. D

    GMS 2 recognizing multiple Spine collision boxes

    Spine allows you to make multiple bounding boxes in an animation. Do any of you fine chaps know of a way to differentiate between them in GMS2? Such as during a collision event returning which bounding box the collision happened with.
  20. JayR

    (Solved) Collision Checking on Asset Layer

    I have a lighting system that creates a sprite on an Asset Layer. The codes below are for items that emit light. Create event: // === Emits Light Handling ========================= // ================================================== // Layer id which light sprite draws on. bp_light_emit = 0...
Top