1 |
with (other) |
2 |
{ |
3 |
if (global.route != 3 && global.flag[17 Dalv fate] == 1) |
4 |
{ |
5 |
if (waiter == 0) |
6 |
sprite_index = spr_wardrobe |
7 |
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))) |
8 |
waiter = 1 |
9 |
if (waiter > 0) |
10 |
{ |
11 |
if (waiter > 2 && waiter < 30) |
12 |
waiter++ |
13 |
if (waiter == 1) |
14 |
{ |
15 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
16 |
with (msg) |
17 |
{ |
18 |
if (global.interaction_count_wardrobe == 0) |
19 |
{ |
20 |
if (!instance_exists(obj_dialoguebox_dummy)) |
21 |
instance_create(0, 0, obj_dialoguebox_dummy) |
22 |
portrait = false |
23 |
sndfnt = 99 |
24 |
message[0] = "* (It's an intimidating looking# wardrobe.)" |
25 |
message[1] = "* (Open it?)" |
26 |
if (outcome == 1 && message_current == 1) |
27 |
{ |
28 |
message[2] = "* (There is a balloon floating# slowly inside. It has a cute# little happy face drawn on it.)" |
29 |
obj_wardrobe.sprite_index = spr_wardrobalon |
30 |
obj_wardrobe.waiter = 2 |
31 |
} |
32 |
if (outcome == 2 && message_current == 1) |
33 |
{ |
34 |
message[2] = "* (You respect Dalv's privacy.)" |
35 |
global.interaction_count_wardrobe++ |
36 |
obj_wardrobe.waiter = 0 |
37 |
with (obj_dialoguebox_dummy) |
38 |
instance_destroy() |
39 |
} |
40 |
if ((message_current + 1) == 1) |
41 |
{ |
42 |
ch_msg = 1 |
43 |
ch[1] = "Yes" |
44 |
ch[2] = "No" |
45 |
} |
46 |
} |
47 |
else |
48 |
{ |
49 |
portrait = true |
50 |
sndfnt = 100 |
51 |
message[0] = "* ..." |
52 |
prt[0] = 1755 |
53 |
obj_wardrobe.waiter = 2 |
54 |
} |
55 |
} |
56 |
} |
57 |
if (waiter == 2 && (!instance_exists(obj_dialogue))) |
58 |
{ |
59 |
if (global.interaction_count_wardrobe == 0) |
60 |
{ |
61 |
obj_dalv2.direction = 180 |
62 |
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
} () |
63 |
global.interaction_count_wardrobe++ |
64 |
waiter++ |
65 |
} |
66 |
else |
67 |
{ |
68 |
waiter = 0 |
69 |
with (obj_dialoguebox_dummy) |
70 |
instance_destroy() |
71 |
} |
72 |
} |
73 |
if (waiter == 30) |
74 |
{ |
75 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
76 |
with (msg) |
77 |
{ |
78 |
sndfnt = 100 |
79 |
message[0] = "* Hey. um. Would you# mind giving Pops his# space?" |
80 |
message[1] = "* He likes the dark..." |
81 |
prt[0] = 1763 |
82 |
prt[1] = 1763 |
83 |
} |
84 |
waiter++ |
85 |
} |
86 |
if (waiter == 31 && (!instance_exists(obj_dialogue))) |
87 |
{ |
88 |
obj_dalv2.direction = 270 |
89 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
90 |
with (msg) |
91 |
{ |
92 |
sndfnt = 99 |
93 |
message[0] = "* (You wave goodbye to Pops# before closing the door# again.)" |
94 |
portrait = false |
95 |
} |
96 |
waiter = 32 |
97 |
} |
98 |
if (waiter == 32) |
99 |
{ |
100 |
obj_dalv2.direction = 270 |
101 |
if (!instance_exists(obj_dialogue)) |
102 |
{ |
103 |
with (obj_dialoguebox_dummy) |
104 |
instance_destroy() |
105 |
waiter = 0 |
106 |
global.cutscene = false |
107 |
} |
108 |
} |
109 |
} |
110 |
} |
111 |
else if (global.flag[17 Dalv fate] != 1 && global.route != 3) |
112 |
{ |
113 |
if (waiter == 0) |
114 |
sprite_index = spr_wardrobe |
115 |
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))) |
116 |
waiter = 1 |
117 |
if (waiter == 1) |
118 |
{ |
119 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
120 |
with (msg) |
121 |
{ |
122 |
portrait = false |
123 |
sndfnt = 99 |
124 |
message[0] = "* (It's an intimidating looking# wardrobe.)" |
125 |
message[1] = "* (Open it?)" |
126 |
if (outcome == 1 && message_current == 1) |
127 |
{ |
128 |
message[2] = "* (There is a balloon floating# slowly inside. It has a cute# little happy face drawn on it.)" |
129 |
message[3] = "* (You wave goodbye to it# before closing the door# again.)" |
130 |
obj_wardrobe.sprite_index = spr_wardrobalon |
131 |
obj_wardrobe.waiter = 2 |
132 |
} |
133 |
if (outcome == 2 && message_current == 1) |
134 |
{ |
135 |
message[2] = "* (You respect Dalv's privacy.)" |
136 |
obj_wardrobe.waiter = 2 |
137 |
} |
138 |
if ((message_current + 1) == 1) |
139 |
{ |
140 |
ch_msg = 1 |
141 |
ch[1] = "Yes" |
142 |
ch[2] = "No" |
143 |
} |
144 |
} |
145 |
} |
146 |
if (waiter == 2 && (!instance_exists(obj_dialogue))) |
147 |
{ |
148 |
global.cutscene = false |
149 |
waiter = 0 |
150 |
obj_pl.alarm[0] = 1 |
151 |
} |
152 |
} |
153 |
else if (global.route == 3) |
154 |
{ |
155 |
if (waiter == 0) |
156 |
sprite_index = spr_wardrobe |
157 |
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))) |
158 |
waiter = 1 |
159 |
if (waiter == 1) |
160 |
{ |
161 |
global.cutscene = true |
162 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
163 |
with (msg) |
164 |
{ |
165 |
if (global.interaction_count_wardrobe == 0) |
166 |
{ |
167 |
portrait = false |
168 |
sndfnt = 99 |
169 |
message[0] = "* (It's a tacky looking black# wardrobe.)" |
170 |
message[1] = "* (You open it.)" |
171 |
message[2] = "* (There is a balloon floating# slowly inside.)" |
172 |
message[3] = "* (You untie it and inhale some# of the contents.)" |
173 |
obj_wardrobe.waiter++ |
174 |
global.interaction_count_wardrobe++ |
175 |
} |
176 |
else |
177 |
{ |
178 |
portrait = false |
179 |
sndfnt = 99 |
180 |
message[0] = "* (You should respect the dead.)" |
181 |
obj_wardrobe.sprite_index = spr_wardrodeflate |
182 |
obj_wardrobe.image_speed = 0 |
183 |
obj_wardrobe.image_index = 16 |
184 |
obj_wardrobe.waiter = 6 |
185 |
} |
186 |
} |
187 |
} |
188 |
if (waiter == 2 && instance_exists(obj_dialogue)) |
189 |
{ |
190 |
if (obj_dialogue.message_current >= 2) |
191 |
{ |
192 |
sprite_index = spr_wardrobalon |
193 |
waiter++ |
194 |
} |
195 |
} |
196 |
if (waiter == 3 && (!instance_exists(obj_dialogue))) |
197 |
{ |
198 |
sprite_index = spr_wardrodeflate |
199 |
image_speed = (1/3) |
200 |
image_index = 0 |
201 |
audio_play_sound(snd_pops_deflate, 1, 0) |
202 |
waiter++ |
203 |
} |
204 |
if (waiter == 5) |
205 |
{ |
206 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
207 |
with (msg) |
208 |
{ |
209 |
portrait = false |
210 |
sndfnt = 99 |
211 |
message[0] = "* (You now sound funny.)" |
212 |
message[1] = "* ..." |
213 |
message[2] = "* (You no longer sound funny.)" |
214 |
obj_wardrobe.waiter++ |
215 |
} |
216 |
} |
217 |
if (waiter == 6 && (!instance_exists(obj_dialogue))) |
218 |
{ |
219 |
global.cutscene = false |
220 |
waiter = 0 |
221 |
obj_pl.alarm[0] = 1 |
222 |
} |
223 |
} |
224 |
} |