1 | dirface = point_direction(x, y, obj_heart.x + 5, obj_heart.y + 5); |
2 | diramt = point_distance(x, y, obj_heart.x + 5, obj_heart.y + 5); |
3 | imax = 20; |
4 | for (i = 0; i < imax; i += 1) |
5 | draw_sprite_ext(spr_shockpart, random(10), x + (lengthdir_x(diramt, dirface) * (i / imax)) + random(12), y + (lengthdir_y(diramt, dirface) * (i / imax)) + random(12), 1, 1, dirface, c_white, 1); |
6 | draw_sprite(spr_shockfinal, random(5), obj_heart.x - 5, obj_heart.y - 5); |
7 | obj_heart.x += (random(2) - 1); |
8 | obj_heart.y += (random(2) - 1); |