M
monamona
Guest
I don't quite understand how this code from the docs work and wants to confirm it.
The docs say the code will destroy the instance of obj_Ball nearest to the instance running the code.
Does that means the x and y in the instance_nearest function refers to the instance that runs the whole code?
Can someone explain how this works? Can't you just use the if statement in this situation?
Code:
with (instance_nearest(x, y, obj_Ball)) { instance_destroy(); }
Does that means the x and y in the instance_nearest function refers to the instance that runs the whole code?
Can someone explain how this works? Can't you just use the if statement in this situation?