1 |
if (global.flag[17 Dalv fate] == 1) |
2 |
{ |
3 |
if (keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact() //gml_Script_scr_interact
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_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_startscr_cutscene_startfunction scr_cutscene_start() //gml_Script_scr_cutscene_start
{
global.cutscene = true
obj_pl.state = gml_Script_scr_frozen_state
obj_pl.image_index = 0
obj_pl.image_speed = 0
} () |
8 |
if (global.interaction_count_broom == 0) |
9 |
{ |
10 |
obj_dalv2.destination_x_dalv = obj_pl.x |
11 |
obj_dalv2.destination_y_dalv = obj_pl.y + 20 |
12 |
} |
13 |
else |
14 |
{ |
15 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvroomhall |
16 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvroomhall |
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 |
{ |
23 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
24 |
with (msg) |
25 |
{ |
26 |
if (global.interaction_count_broom == 0) |
27 |
{ |
28 |
portrait = true |
29 |
sndfnt = 100 |
30 |
message[0] = "* Be careful with that." |
31 |
message[1] = "* That broom has been like# my best friend." |
32 |
message[2] = "* I never thought he'd be# replaced by a real# friend!" |
33 |
prt[0] = 1763 |
34 |
prt[1] = 1755 |
35 |
prt[2] = 1769 |
36 |
} |
37 |
else |
38 |
{ |
39 |
portrait = true |
40 |
sndfnt = 100 |
41 |
message[0] = "* ..." |
42 |
prt[0] = 1755 |
43 |
} |
44 |
} |
45 |
waiter++ |
46 |
} |
47 |
if (waiter == 3 && (!instance_exists(obj_dialogue))) |
48 |
{ |
49 |
if (global.interaction_count_broom == 0) |
50 |
{ |
51 |
global.interaction_count_broom++ |
52 |
waiter++ |
53 |
} |
54 |
else |
55 |
waiter = 4 |
56 |
} |
57 |
if (waiter >= 4 && waiter <= 5 && (!instance_exists(obj_dialogue))) |
58 |
{ |
59 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvroomhall |
60 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvroomhall |
61 |
if (obj_dalv2.x == obj_dalv2.default_x_dalvroomhall && obj_dalv2.y == obj_dalv2.default_y_dalvroomhall) |
62 |
waiter++ |
63 |
} |
64 |
if (waiter == 6) |
65 |
{ |
66 |
global.cutscene = false |
67 |
waiter = 0 |
68 |
obj_pl.alarm[0] = 1 |
69 |
} |
70 |
} |
71 |
else if (global.flag[17 Dalv fate] != 1 && global.route != 3) |
72 |
{ |
73 |
if (keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact() //gml_Script_scr_interact
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_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))) |
74 |
waiter = 1 |
75 |
if (waiter == 1) |
76 |
{ |
77 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
78 |
with (msg) |
79 |
{ |
80 |
portrait = false |
81 |
sndfnt = 99 |
82 |
message[0] = "* (It's a well worn broom.)" |
83 |
obj_broom.waiter = 2 |
84 |
} |
85 |
} |
86 |
if (waiter == 2 && (!instance_exists(obj_dialogue))) |
87 |
{ |
88 |
global.cutscene = false |
89 |
waiter = 0 |
90 |
obj_pl.alarm[0] = 1 |
91 |
} |
92 |
} |
93 |
else if (global.route == 3) |
94 |
{ |
95 |
if (keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact() //gml_Script_scr_interact
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_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))) |
96 |
waiter = 1 |
97 |
if (waiter == 1) |
98 |
{ |
99 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
100 |
with (msg) |
101 |
{ |
102 |
portrait = false |
103 |
sndfnt = 99 |
104 |
message[0] = "* (A broom.)" |
105 |
message[1] = "* (The wood is splintered.)" |
106 |
obj_broom.waiter = 2 |
107 |
} |
108 |
} |
109 |
if (waiter == 2 && (!instance_exists(obj_dialogue))) |
110 |
{ |
111 |
global.cutscene = false |
112 |
waiter = 0 |
113 |
obj_pl.alarm[0] = 1 |
114 |
} |
115 |
} |