collision event

  1. A

    SOLVED What order does the "collision event" occur?

    I'm using the "collision event" to push gameobjects away from each other when they begin touching The "begin step event" handles the numbers for movement caused by player input and some other influences that affect the hsp & vsp When the "collision event" occurs, the hsp & vsp change too and...
  2. Z

    GMS 2.3+ Collisions with objects + sliding on walls

    Hi everyone. I'm trying to make collidable objects, of many different types. For now, I'm using walls as a test case. What I want to do is this: the player should collide with a wall object and still be able to move except where there is a wall. This is the setup (that can not change): 1)...
  3. hisoka_2020

    SOLVED I have a problem with the collision event (problem was collision mask)

    This is my first time in years asking for help. so I hope someone out there could help me. here's an explanation of my problem: I'm making a mini RPG game and i have a new enemy that follows his comrades around and heals them. For some reason the new enemy doesn't seem at all to respond to...
  4. SonicTheHedgehog+123

    Legacy GM [solved]Collision Event doesnt work on y axis

    I want that my player to restart the room when he is between a vertical platform and the floor. It works that when he is meeting the floor and the platform he restarts the room. But the strange problem I have is when I am jumping on the y axis of the platform and the platform is moving...
  5. Bart

    GMS 2 Only trigger collision event when colliding with specific collision group

    Hi all. Recently I've been working on physics collisions on multiple levels using Box2D. To achieve that, I define each level's collision mask with a different positive collision group (>0). When the z value passes the midway point (half level height), I unbind the player's fixture, change its...
  6. MartinK12

    GMS 2 [SOLVED] Is there a difference between collision event and collision code in step event?

    Like in the title is there a difference between using collision event or placing my own collision code in the step event? I assume that when I put my own collision code in step event it's going to be run every step, but collision event is also running every step, right? So is there a difference...
  7. S

    Collision not working at all

    I have two objects, one serving as a wall, and one is the character. When I move the character into the wall, the character goes right through it. They're both checked solid, and I already have a collision event set for both of them, but it doesn't seem to affect the character at all.
  8. Alloi

    GMS 2 [SOLVED] Physics_Test_Overlap

    I have a parent object named oBlock. Then I have 2 children objects, one named oPlayer1 and the other oPlayer2. I am trying to have it so collision is detected if the other jumps onto their head. My issue is that when using "physics_test_overlap(x,y,image_angle,oBlock)" a collision is always...
  9. D

    GMS 2 Collision Event + place_meeting [SOLVED]

    Hello everyone! The problem I have faced with is more or less common, but I didn't find any solutions for my case. I create bullet object and it has a speed. As far as I know, the speed determines the distance in pixels where object would be drown every step. So if the bullet has speed 6, and...
  10. 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...
  11. E

    GML What's the code equivalent for the collision event?

    I'm trying to make a script for the collision event because I use too many collision events and is not very efficient. I tried place_meeting in the step event and it doesn't execute when collided. Can someone help? Thanks.
  12. Jmarlin3

    Collision Issues

    The objective is to have the player enter the cupboard with the open sprite. I right click to open, and right click to close. Code for player: //Stealth Variables if(vspeed != 0 or hspeed != 0) { noise_level = max_speed*25; } else { noise_level = 0; }...
  13. M

    GML Expanding Circular Collisionbox

    I need a circular collisionbox that can expand or shrink with a (variable) number value. I've tried: //STEP EVENT cor_radius = random_range(cor_rMin,cor_rMax); //randomize core size rad_radius = random_range(rad_rMin,rad_rMax); //randomize radiation zone size if...
  14. E

    Collision event not changing state.

    Within my step event of obj_Enemy_1 I have three states. Currently, in the "Attacking" state I have the following: case "Attacking": var attack_angle = point_direction(x, y, obj_Player1.x, obj_Player1.y); var shot = instance_create_layer(x, y, layer, obj_Enemy_laser)...
  15. E

    Understanding collision events with object

    I've having a difficult time understanding how to code collision events and I'm either getting no results or an unexpected one. I'm working on a shooter. I have one enemy object, which appears numerous times on screen. However, I'm having issues when a player freeze weapon collides with one of...
  16. V

    Legacy GM Code works in Collision Event but not as collision check on Step Event

    Hello everyone. I have been struggling for a while to develop a viable method for top-down 2.5D jumping/platformer engine (think SMRPG, M&L mario series) and, as my prototypes had serious issues, I went for free examples to learn. I did found two that were very effective and could be...
  17. J

    Collision not Working with Cust. Mask

    I created a custom mask for my ai punch animation. The mask is its own object and is instance_create'd when the punch animation/ frames are fully extended. Im not getting collision even though Ive tried all types of collision commands that make sense to me so that my player when "hit" gets...
  18. V

    GML How to check for a collision with one specific instance just created?

    After reading the documentation on collision methods I couldn't find a complete solution for this situation: I have an object 1 with a create instance action at its create event. That action creates an instance of an object 2. Then I need to make a collision event (or check for collisions in...
  19. J

    GMS 2 collision event not triggering

    I can't find a way to get code in the collision event of an object to be read. I countered this by using instance_place to make a self made collision check and do. But, it would be easier for me if that event would be triggered properly. Both objects have a it's proper mask. I don't use...
  20. A

    GML Step event or collision check for attacks?

    Hi all. Im still fairly noob but learning more everyday. In some (melee/projectile) attack tutorials they say to use a collision check event to initiate the code of dealing damage etc, and in others they say to put that code in the step event. which is better [for what purposes] and why? I've...