if (place_meeting(x+hspeed,y,obj_walls)) { repeat(abs(hspeed)) { if (!place_meeting(x+sign(hspeed),y,obj_walls)) { x += sign(hspeed); } else { break; } } hspeed = 0; instance_destroy(); } if (place_meeting(x,y+vspeed,obj_walls)) { repeat(abs(vspeed)) { if (!place_meeting(x,y+sign(vspeed),obj_walls)) { y += sign(vspeed); } else { break; } } vspeed = 0; instance_destroy(); } if (place_meeting(x+hspeed,y,obj_player)) { repeat(abs(hspeed)) { if (!place_meeting(x+sign(hspeed),y,obj_player)) { x += sign(hspeed); } else { break; } } hspeed = 0; global.healths -= 100; instance_destroy(); } if (place_meeting(x,y+vspeed,obj_player)) { repeat(abs(vspeed)) { if (!place_meeting(x,y+sign(vspeed),obj_player)) { y += sign(vspeed); } else { break; } } vspeed = 0; global.healths -= 100; instance_destroy(); } depth = -y; image_angle = direction; x -= .1*hspeed; y -= .1*vspeed; draw_set_alpha(.25); draw_self(); x -= .1*hspeed; y -= .1*vspeed; draw_set_alpha(.5); draw_self(); x += .2*hspeed; y += .2*vspeed; draw_set_alpha(1); draw_self();