1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (waiter == 0) |
4 |
waiter++; |
5 |
if (waiter == 1) |
6 |
{ |
7 |
global.cutscene = true; |
8 |
obj_pl.direction = 180; |
9 |
waiter++; |
10 |
} |
11 |
if (waiter == 2) |
12 |
{ |
13 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
14 |
with (msg) |
15 |
{ |
16 |
if (!instance_exists(obj_dialoguebox_dummy)) |
17 |
instance_create(0, 0, obj_dialoguebox_dummy); |
18 |
portrait = true; |
19 |
sndfnt = 99; |
20 |
sndfnt_array[0] = 100; |
21 |
sndfnt_array[1] = 99; |
22 |
sndfnt_array[2] = 100; |
23 |
message[0] = "* Are you ready to leave?"; |
24 |
message[1] = "* Leave Dalv's house?"; |
25 |
prt[0] = 1755; |
26 |
if (outcome == 1 && message_current == 1) |
27 |
{ |
28 |
obj_doorway_blocker_dalvshouse.response = "yes"; |
29 |
obj_doorway_blocker_dalvshouse.waiter = 7; |
30 |
message[2] = "* If that's what you want,# I'll lead the way."; |
31 |
prt[2] = 1776; |
32 |
sndfnt = 100; |
33 |
} |
34 |
else if (outcome == 2 && message_current == 1) |
35 |
{ |
36 |
obj_doorway_blocker_dalvshouse.response = "no"; |
37 |
obj_doorway_blocker_dalvshouse.waiter = 7; |
38 |
message[2] = "* Alright, take as long as# you like."; |
39 |
prt[2] = 1776; |
40 |
sndfnt = 100; |
41 |
} |
42 |
if (message_current == 0 || message_current == 2) |
43 |
{ |
44 |
sndfnt = 100; |
45 |
} |
46 |
else |
47 |
{ |
48 |
obj_dalv2.image_index = 0; |
49 |
obj_dalv2.image_speed = 0; |
50 |
sndfnt = 99; |
51 |
} |
52 |
ch_msg = 1; |
53 |
ch[1] = "Yes"; |
54 |
ch[2] = "No"; |
55 |
} |
56 |
} |
57 |
if (waiter == 5 && !instance_exists(obj_dialogue)) |
58 |
waiter++; |
59 |
if (waiter == 6) |
60 |
{ |
61 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
62 |
with (msg) |
63 |
{ |
64 |
if (obj_doorway_blocker_dalvshouse.response == "yes") |
65 |
{ |
66 |
portrait = true; |
67 |
sndfnt = 100; |
68 |
message[0] = "* If that's what you want,# I'll lead the way."; |
69 |
prt[0] = 1776; |
70 |
} |
71 |
else if (obj_doorway_blocker_dalvshouse.response == "no") |
72 |
{ |
73 |
portrait = true; |
74 |
sndfnt = 100; |
75 |
message[0] = "* Alright, take as long as# you like."; |
76 |
prt[0] = 1776; |
77 |
} |
78 |
} |
79 |
waiter++; |
80 |
} |
81 |
if (waiter >= 7 && waiter <= 8 && !instance_exists(obj_dialogue)) |
82 |
{ |
83 |
with (obj_dialoguebox_dummy) |
84 |
instance_destroy(); |
85 |
if (response == "yes") |
86 |
{ |
87 |
instance_create_depth(obj_pl.x, obj_pl.y, obj_pl.depth, obj_player_npc); |
88 |
obj_pl.image_alpha = 0; |
89 |
waiter = 10; |
90 |
} |
91 |
if (response == "no") |
92 |
{ |
93 |
obj_dalv2.direction = 270; |
94 |
if (obj_dalv2.x == obj_dalv2.default_x_dalvshouse && obj_dalv2.y == obj_dalv2.default_y_dalvshouse) |
95 |
{ |
96 |
if (!instance_exists(obj_player_npc)) |
97 |
instance_create_depth(obj_pl.x, obj_pl.y, obj_pl.depth, obj_player_npc); |
98 |
obj_pl.image_alpha = 0; |
99 |
waiter = 9; |
100 |
} |
101 |
} |
102 |
} |
103 |
if (waiter == 9) |
104 |
{ |
105 |
if (cutscene_npc_walk(1168, obj_pl.x, 115, 3, "y", "up")) |
106 |
{ |
107 |
user_event_0_activated = false; |
108 |
global.cutscene = false; |
109 |
waiter = 0; |
110 |
obj_pl.alarm[0] = 1; |
111 |
instance_destroy(obj_player_npc); |
112 |
} |
113 |
} |
114 |
if (waiter == 10) |
115 |
{ |
116 |
if (cutscene_npc_walk(1168, obj_pl.x, 115, 3, "y", "up")) |
117 |
{ |
118 |
obj_dalv2.destination_x_dalv = 219; |
119 |
obj_dalv2.destination_y_dalv = 90; |
120 |
no_loop_autowalk = false; |
121 |
waiter = 11; |
122 |
instance_destroy(obj_player_npc); |
123 |
} |
124 |
} |
125 |
if (waiter == 11) |
126 |
{ |
127 |
if (obj_dalv2.x == obj_dalv2.destination_x_dalv && obj_dalv2.y == obj_dalv2.destination_y_dalv) |
128 |
waiter++; |
129 |
} |
130 |
if (waiter == 12) |
131 |
{ |
132 |
obj_dalv2.destination_x_dalv = 220; |
133 |
obj_dalv2.destination_y_dalv = -40; |
134 |
if (obj_dalv2.x == 220 && obj_dalv2.y <= 20) |
135 |
{ |
136 |
with (obj_pl) |
137 |
{ |
138 |
if (!instance_exists(obj_transition)) |
139 |
{ |
140 |
obj_pl.state = scr_frozen_state; |
141 |
alarm[0] |
142 |
trn = instance_create(x, y, obj_transition); |
143 |
trn.newRoom = 36; |
144 |
trn.xx = 156; |
145 |
trn.yy = 530; |
146 |
} |
147 |
} |
148 |
} |
149 |
if (abs(obj_pl.y - obj_dalv2.y) > 40) |
150 |
{ |
151 |
with (obj_pl) |
152 |
{ |
153 |
if (state != scr_autowalk_state) |
154 |
{ |
155 |
autowalk_direction = "up"; |
156 |
state = scr_autowalk_state; |
157 |
} |
158 |
player_mode = "DalvExit"; |
159 |
} |
160 |
} |
161 |
} |
162 |
if (waiter >= 1 && waiter < 11) |
163 |
obj_dalv2.direction = 0; |