1 |
if (move == false) |
2 |
{ |
3 |
if (image_alpha < 1) |
4 |
{ |
5 |
image_alpha += 0.1 |
6 |
if (image_alpha > 1) |
7 |
image_alpha = 1 |
8 |
if (image_alpha == 1) |
9 |
alarm[0] = 20alarm[0]angle = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)
image_angle = angle
move = true
audio_play_sound(snd_undertale_swoosh, 1, 0) |
10 |
} |
11 |
if (image_alpha == 1) |
12 |
{ |
13 |
if instance_exists(obj_heart_battle_fighting_parent) |
14 |
{ |
15 |
var random_intensity = irandom_range(-1, 1) |
16 |
angle = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y) |
17 |
image_angle = angle + angle_intensity * random_intensity |
18 |
} |
19 |
} |
20 |
} |
21 |
else if (move == true) |
22 |
{ |
23 |
x += lengthdir_x(move_speed, angle) |
24 |
y += lengthdir_y(move_speed, angle) |
25 |
if (move_speed < move_speed_max) |
26 |
{ |
27 |
move_speed += move_speed_increase |
28 |
if (move_speed > move_speed_max) |
29 |
move_speed = move_speed_max |
30 |
} |
31 |
} |
32 |
if (bbox_right < 0 || bbox_left > room_width || bbox_bottom < 0 || bbox_top > room_height) |
33 |
instance_destroy() |