1 |
if (global.flag[17 Dalv fate] == 1) |
2 |
{ |
3 |
if ((keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
4 |
waiter = 1; |
5 |
if (waiter == 1) |
6 |
{ |
7 |
global.cutscene = true; |
8 |
obj_dalv2.destination_x_dalv = obj_dalv2.x; |
9 |
obj_dalv2.destination_y_dalv = obj_dalv2.y; |
10 |
if (obj_dalv2.x == obj_dalv2.destination_x_dalv && obj_dalv2.y == obj_dalv2.destination_y_dalv) |
11 |
waiter++; |
12 |
} |
13 |
if (waiter == 2) |
14 |
{ |
15 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
16 |
with (msg) |
17 |
{ |
18 |
if (global.interaction_count_painting == 0) |
19 |
{ |
20 |
portrait = true; |
21 |
sndfnt = 100; |
22 |
message[0] = "* Someone made that for me# a while back."; |
23 |
message[1] = "* It's a single corn from# the corn field out in# the Ruins."; |
24 |
message[2] = "* I started that field# from one piece of corn."; |
25 |
message[3] = "* Before I closed off the# door to Snowdin,# something happened."; |
26 |
message[4] = "* I kept finding corn# sitting on my doorstep."; |
27 |
message[5] = "* Every morning it was# just, there."; |
28 |
message[6] = "* I didn't know who was# leaving it but..."; |
29 |
message[7] = "* Somehow I thought they# were my friend."; |
30 |
message[8] = "* I always wanted to repay# their kind deeds but..."; |
31 |
message[9] = "* I never could think of# anything to leave in# return."; |
32 |
message[10] = "* And one day they just# stopped showing up."; |
33 |
message[11] = "* That's when I decided to# hide away."; |
34 |
message[12] = "* But I planted the last# cob of corn I had down# here."; |
35 |
message[13] = "* It's taken to the# environment surprisingly# well."; |
36 |
message[14] = "* I always found it rather# inspiring."; |
37 |
prt[0] = 1769; |
38 |
prt[1] = 1769; |
39 |
prt[2] = 1776; |
40 |
prt[3] = 1755; |
41 |
prt[4] = 1755; |
42 |
prt[5] = 1755; |
43 |
prt[6] = 1755; |
44 |
prt[7] = 1769; |
45 |
prt[8] = 1755; |
46 |
prt[9] = 1780; |
47 |
prt[10] = 1763; |
48 |
prt[11] = 1759; |
49 |
prt[12] = 1776; |
50 |
prt[13] = 1776; |
51 |
prt[14] = 1769; |
52 |
} |
53 |
else |
54 |
{ |
55 |
portrait = true; |
56 |
sndfnt = 100; |
57 |
message[0] = "* ..."; |
58 |
prt[0] = 1755; |
59 |
} |
60 |
} |
61 |
waiter++; |
62 |
} |
63 |
if (waiter == 3 && !instance_exists(obj_dialogue)) |
64 |
{ |
65 |
if (global.interaction_count_painting == 0) |
66 |
{ |
67 |
global.interaction_count_painting++; |
68 |
waiter++; |
69 |
} |
70 |
else |
71 |
{ |
72 |
waiter = 4; |
73 |
} |
74 |
} |
75 |
if (waiter >= 4 && waiter <= 5 && !instance_exists(obj_dialogue)) |
76 |
{ |
77 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvroomhall; |
78 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvroomhall; |
79 |
if (obj_dalv2.x == obj_dalv2.default_x_dalvroomhall && obj_dalv2.y == obj_dalv2.default_y_dalvroomhall) |
80 |
waiter++; |
81 |
} |
82 |
if (waiter == 6) |
83 |
{ |
84 |
global.cutscene = false; |
85 |
waiter = 0; |
86 |
obj_pl.alarm[0] = 1; |
87 |
} |
88 |
} |
89 |
else if (global.flag[17 Dalv fate] != 1 && global.route != 3) |
90 |
{ |
91 |
if ((keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
92 |
waiter = 1; |
93 |
if (waiter == 1) |
94 |
{ |
95 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
96 |
with (msg) |
97 |
{ |
98 |
portrait = false; |
99 |
sndfnt = 99; |
100 |
message[0] = "* (It's a nice painting of a# small, lonely cob.)"; |
101 |
message[1] = "* (A signature that reads# \"Penilla\", is written in the# corner.)"; |
102 |
obj_painting.waiter = 2; |
103 |
} |
104 |
} |
105 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
106 |
{ |
107 |
global.cutscene = false; |
108 |
waiter = 0; |
109 |
obj_pl.alarm[0] = 1; |
110 |
} |
111 |
} |
112 |
else if (global.route == 3) |
113 |
{ |
114 |
if ((keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state)
{
var pl_dir = obj_pl.direction;
var pl_x = 0;
var pl_y = 0;
var check_distance_x = 0;
var check_distance_y = 0;
switch (pl_dir)
{
case 0:
pl_x = obj_pl.bbox_right;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = 20;
break;
case 180:
pl_x = obj_pl.bbox_left;
pl_y = obj_pl.bbox_top + 1;
check_distance_x = -20;
break;
case 90:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_top;
check_distance_y = -20;
break;
case 270:
pl_x = obj_pl.x;
pl_y = obj_pl.bbox_bottom;
check_distance_y = 20;
break;
}
if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false))
return true;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
115 |
waiter = 1; |
116 |
if (waiter == 1) |
117 |
{ |
118 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
119 |
with (msg) |
120 |
{ |
121 |
portrait = false; |
122 |
sndfnt = 99; |
123 |
message[0] = "* (A painting.)"; |
124 |
message[1] = "* (It's lacking corn realism.)"; |
125 |
obj_painting.waiter = 2; |
126 |
} |
127 |
} |
128 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
129 |
{ |
130 |
global.cutscene = false; |
131 |
waiter = 0; |
132 |
obj_pl.alarm[0] = 1; |
133 |
} |
134 |
} |