i need help destroying other(without using event collision)

if(place_meeting(x,y,obj_enemy1)){
instance_destroy(other)
}

The code above is the one that isn't working. I'm sure you have the idea of what I was trying to do.
I'm guessing its because its giving true or false output, but I'm not sure how to make any alternatives without using event collision. (and I don't want to have to use event collision.)

please help me, thank you!
 

Jakylgamer

Member
wha you want is instance_place() it will return an id of the colliding object then you can use that to destroy it
GML:
var obj = instance_place(x,y,obj_you_want_to_destroy);
with(obj) {
    instance_destroy()
}
 
Top