1 |
var actor_toriel = 1159; |
2 |
var distance_to_clover = 80; |
3 |
with (actor_toriel) |
4 |
{ |
5 |
if (y <= 100) |
6 |
{ |
7 |
image_speed = 0; |
8 |
image_index = 0; |
9 |
image_alpha -= 0.1; |
10 |
path_speed = 0; |
11 |
if (image_alpha < 0) |
12 |
instance_destroy(); |
13 |
global.ruins_flag[1] = true; |
14 |
exit; |
15 |
} |
16 |
if ((obj_pl.y - y) < distance_to_clover) |
17 |
{ |
18 |
if (path_index == -1) |
19 |
path_start(pt_toriel_ruins02, 3, path_action_stop, false); |
20 |
action_sprite = true; |
21 |
path_speed = 3 + (obj_pl.is_sprinting * 2); |
22 |
image_speed = 0.2; |
23 |
} |
24 |
else if ((obj_pl.y - y) > (distance_to_clover + 20)) |
25 |
{ |
26 |
action_sprite = false; |
27 |
npc_direction = "down"; |
28 |
path_speed = 0; |
29 |
image_speed = 0; |
30 |
image_index = 0; |
31 |
} |
32 |
if (path_speed > 0) |
33 |
{ |
34 |
if (direction == 0 && sprite_index != right_sprite) |
35 |
sprite_index = right_sprite; |
36 |
if (direction != 0 && sprite_index != up_sprite) |
37 |
sprite_index = up_sprite; |
38 |
} |
39 |
} |