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 |
scr_cutscene_start(); |
8 |
if (global.interaction_count_books == 0) |
9 |
{ |
10 |
obj_dalv2.destination_x_dalv = obj_pl.x; |
11 |
obj_dalv2.destination_y_dalv = obj_pl.y - 40; |
12 |
} |
13 |
else |
14 |
{ |
15 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvshouse; |
16 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvshouse; |
17 |
} |
18 |
if (obj_dalv2.x == obj_dalv2.destination_x_dalv && obj_dalv2.y == obj_dalv2.destination_y_dalv) |
19 |
waiter++; |
20 |
} |
21 |
if (waiter == 2) |
22 |
image_index = 1; |
23 |
if (waiter == 2) |
24 |
{ |
25 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
26 |
with (msg) |
27 |
{ |
28 |
if (global.interaction_count_books == 0) |
29 |
{ |
30 |
if (!instance_exists(obj_dialoguebox_dummy)) |
31 |
instance_create(0, 0, obj_dialoguebox_dummy); |
32 |
portrait = true; |
33 |
sndfnt = 100; |
34 |
message[0] = "* You like those?"; |
35 |
message[1] = "* Those are my projects."; |
36 |
message[2] = "* I sometimes try to write# books. Like for kids and# stuff..."; |
37 |
prt[0] = 1776; |
38 |
prt[1] = 1769; |
39 |
prt[2] = 1761; |
40 |
} |
41 |
else |
42 |
{ |
43 |
portrait = true; |
44 |
sndfnt = 100; |
45 |
message[0] = "* ..."; |
46 |
prt[0] = 1755; |
47 |
} |
48 |
} |
49 |
waiter++; |
50 |
} |
51 |
if (waiter == 3 && !instance_exists(obj_dialogue)) |
52 |
{ |
53 |
if (global.interaction_count_books == 0) |
54 |
{ |
55 |
global.interaction_count_books++; |
56 |
waiter++; |
57 |
} |
58 |
else |
59 |
{ |
60 |
waiter = 7; |
61 |
} |
62 |
} |
63 |
if (waiter == 4) |
64 |
{ |
65 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
66 |
with (msg) |
67 |
{ |
68 |
portrait = false; |
69 |
sndfnt = 99; |
70 |
message[0] = "* (The table is covered in# colorful pencils and pages# strewn with cute pictures.)"; |
71 |
} |
72 |
waiter++; |
73 |
} |
74 |
if (waiter == 5 && !instance_exists(obj_dialogue)) |
75 |
waiter++; |
76 |
if (waiter == 6) |
77 |
{ |
78 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
79 |
with (msg) |
80 |
{ |
81 |
portrait = true; |
82 |
sndfnt = 100; |
83 |
message[0] = "* I sometimes kinda forget# what colors things are# outside this place..."; |
84 |
message[1] = "* So I just make them up!"; |
85 |
message[2] = "* I think the kids will# find it more interesting# like that anyway!"; |
86 |
message[3] = "* ..."; |
87 |
message[4] = "* It might not be as# educational though..."; |
88 |
prt[0] = 1780; |
89 |
prt[1] = 1776; |
90 |
prt[2] = 1761; |
91 |
prt[3] = 1755; |
92 |
prt[4] = 1780; |
93 |
} |
94 |
waiter++; |
95 |
} |
96 |
if (waiter >= 7 && waiter <= 8 && !instance_exists(obj_dialogue)) |
97 |
{ |
98 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvshouse; |
99 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvshouse; |
100 |
if (obj_dalv2.x == obj_dalv2.default_x_dalvshouse && obj_dalv2.y == obj_dalv2.default_y_dalvshouse) |
101 |
waiter++; |
102 |
with (obj_dialoguebox_dummy) |
103 |
instance_destroy(); |
104 |
} |
105 |
if (waiter == 9) |
106 |
{ |
107 |
global.cutscene = false; |
108 |
waiter = 0; |
109 |
obj_pl.alarm[0] = 1; |
110 |
} |
111 |
} |
112 |
else if (global.flag[17 Dalv fate] != 1 && 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] = "* (The table is covered in# colorful pencils and pages# strewn with cute pictures.)"; |
124 |
obj_books.waiter = 2; |
125 |
} |
126 |
} |
127 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
128 |
{ |
129 |
global.cutscene = false; |
130 |
waiter = 0; |
131 |
obj_pl.alarm[0] = 1; |
132 |
} |
133 |
} |
134 |
else if (global.route == 3) |
135 |
{ |
136 |
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))) |
137 |
waiter = 1; |
138 |
if (waiter == 1) |
139 |
{ |
140 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
141 |
with (msg) |
142 |
{ |
143 |
portrait = false; |
144 |
sndfnt = 99; |
145 |
message[0] = "* (Childish pictures scattered on# the table.)"; |
146 |
obj_books.waiter = 2; |
147 |
} |
148 |
} |
149 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
150 |
{ |
151 |
global.cutscene = false; |
152 |
waiter = 0; |
153 |
obj_pl.alarm[0] = 1; |
154 |
} |
155 |
} |