simple collision

Discussion in 'Programming' started by daDude, Jun 18, 2018.

  1. daDude

    daDude Member

    Joined:
    Jun 3, 2018
    Posts:
    4
    Hi, I'm trying to use place_empty(x,y); to check to see if my player touch another instance like this

    //this is the object that create event is attached to so I did like this

    x +=3;
    if(place_empty(object1.x, object1.y))
    {
    instance_destroy();
    }

    the only problem is my object got destroy before it even touch my object1 instancce
    im new to this so please help. thank you
     
  2. Becon

    Becon Member

    Joined:
    Jul 13, 2016
    Posts:
    109
    Looks like it's telling it: If the place is empty then it's OK to destroy.
    Nothing about if you make contact or place_meeting with anything then destroy something.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice