How can I use place_meeting to determine if two objects are no longer colliding in GameMaker Studio?

20 Views Asked by At

I have an object called static_world_object, which I intend to be the parent of objects that are inanimate. I added code in the step event which I intend to check to see if a player object is currently colliding with it.

if self.image_alpha < 1{ // Checks to see if the static object has become transparent

    var obj_player_instance;
    obj_player_instance = instance_find(obj_player,0);

    if !place_meeting(obj_player_instance.x, obj_player_instance.y, self){
        show_debug_message("A");}
    else{
        show_debug_message("B");
    }
}

enter image description here

enter image description here

In the images added to the question, it can be seen that no matter whether I'm colliding with the inanimate object or not, it always logs "A".

What am I missing here?

0

There are 0 best solutions below