I have the following code in the step event of obj_bullet which is doing a collision check on obj_wall and then destroying the bullet.
if (collision_line(x, y, xprevious, yprevious, obj_wall, false, false)) {
instance_destroy();
}
How do I also make it destroy the obj_wall?
I have tried:
instance_destroy(other.id);
But I can understand why this hasn't worked.
if (collision_line(x, y, xprevious, yprevious, obj_wall, false, false)) {
instance_destroy();
}
How do I also make it destroy the obj_wall?
I have tried:
instance_destroy(other.id);
But I can understand why this hasn't worked.