1 |
depth = (-y) |
2 |
if (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;
}
} () && keyboard_multicheck_pressed(0)) |
3 |
{ |
4 |
if (global.snowdin_flag[3] == 0) |
5 |
{ |
6 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
7 |
talk = 1 |
8 |
if (global.geno_complete[2] || global.route == 3) |
9 |
{ |
10 |
with (msg) |
11 |
{ |
12 |
message[0] = "* I thaw ethweone dwunning away# throm thomething." |
13 |
message[1] = "* I thwant to thollow them...# but I can't." |
14 |
message[2] = "* I'm scayed..." |
15 |
} |
16 |
return; |
17 |
} |
18 |
with (msg) |
19 |
{ |
20 |
portrait = false |
21 |
message[0] = "* Hey! You!" |
22 |
message[1] = "* Can you hep ne ofth thith pole?" |
23 |
message[2] = "* I'ff been hewe fo two howas now." |
24 |
message[3] = "* Thwee dogs came up and# dauwd me to lick it." |
25 |
message[4] = "* Due to the cold weatha,# I'm now thtuck!" |
26 |
message[5] = "* Ny nom told me to be back# in dime for lunth too." |
27 |
message[6] = "* Pweasth hep." |
28 |
other.slurpy_menu_open = true |
29 |
global.snowdin_flag[3] = 1 |
30 |
} |
31 |
} |
32 |
else |
33 |
slurpy_menu_open = true |
34 |
} |
35 |
if ((!global.dialogue_open) && slurpy_menu_open == true) |
36 |
{ |
37 |
instance_create(x, y, obj_item_use_menu) |
38 |
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
} () |
39 |
slurpy_menu_open = false |
40 |
} |
41 |
if (waiter == 1 && (!global.dialogue_open)) |
42 |
{ |
43 |
instance_create((x + 6), (y - 5), part_smoke_slurpy) |
44 |
audio_play_sound(snd_puzzle_icemelt, 20, 0) |
45 |
waiter = 2 |
46 |
timer = 30 |
47 |
} |
48 |
if (waiter == 4 && (!instance_exists(obj_dialogue))) |
49 |
{ |
50 |
if place_free(x, (y - 10)) |
51 |
{ |
52 |
vspeed = -3 |
53 |
sprite_index = spr_slurpy_up_yellow |
54 |
} |
55 |
else |
56 |
{ |
57 |
hspeed = -3 |
58 |
sprite_index = spr_slurpy_left_yellow |
59 |
} |
60 |
image_speed = 0.2 |
61 |
waiter = 5 |
62 |
} |
63 |
if (waiter == 5) |
64 |
{ |
65 |
with (msg) |
66 |
{ |
67 |
if (message_current == 1) |
68 |
other.talk = true |
69 |
message[1] = "* Hey, hwat er you, crathy?" |
70 |
message[2] = "* Thath thin iv thteaming!" |
71 |
message[3] = "* I need thomething hot, but not# THAT hot!" |
72 |
} |
73 |
if (!global.dialogue_open) |
74 |
{ |
75 |
scr_cutscene_end() |
76 |
waiter = 0 |
77 |
} |
78 |
} |
79 |
if (timer > 0) |
80 |
timer-- |
81 |
else if (timer != -1) |
82 |
{ |
83 |
if (waiter == 2) |
84 |
{ |
85 |
sprite_index = spr_slurpy_retract_yellow |
86 |
instance_create(x, y, obj_lamppost) |
87 |
image_speed = 0.2 |
88 |
waiter = 3 |
89 |
timer = -1 |
90 |
} |
91 |
else if (waiter == 3) |
92 |
{ |
93 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
94 |
with (msg) |
95 |
{ |
96 |
portrait = false |
97 |
message[0] = "* At last! I am liberated!" |
98 |
message[1] = "* I cannot thank you enough!# You are a wonderful samaritan!" |
99 |
message[2] = "* Here, a token of my gratitude." |
100 |
message[3] = "* (You got a Silver Scarf.)" |
101 |
message[4] = "* Knitted by my auntie with# abundant passion!" |
102 |
message[5] = "* May it warm your skin, and# your SOUL good fellow!" |
103 |
message[6] = "* Now, I must get home post-haste!# Mother is bound to be# perturbed already!" |
104 |
message[7] = "* Farewell!" |
105 |
if (message_current == 3) |
106 |
{ |
107 |
if (!(scr_item_exists_checkscr_item_exists_checkfunction scr_item_exists_check(argument0) //gml_Script_scr_item_exists_check
{
var i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
return true;
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Silver Scarf"))) |
108 |
{ |
109 |
scr_item_removescr_item_removefunction scr_item_remove(argument0) //gml_Script_scr_item_remove
{
i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[(i + 1)]
i += 1
}
global.item_slot[8] = "Nothing"
return true;
}
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Lukewarm Coffee") |
110 |
scr_itemscr_itemfunction scr_item(argument0) //gml_Script_scr_item
{
nm = argument0
var i = 1
while (i <= 8)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm
return true;
}
else
{
if (i == 8)
return false;
i++
continue
}
}
} ("Silver Scarf") |
111 |
other.talk = false |
112 |
} |
113 |
} |
114 |
else if (message_current == 4) |
115 |
{ |
116 |
other.timer = -1 |
117 |
other.talk = true |
118 |
other.waiter = 4 |
119 |
} |
120 |
else |
121 |
other.talk = true |
122 |
} |
123 |
} |
124 |
} |
125 |
if (instance_exists(obj_dialogue) && talk == true) |
126 |
{ |
127 |
if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current])) |
128 |
{ |
129 |
image_speed = 0 |
130 |
image_index = 0 |
131 |
} |
132 |
else |
133 |
image_speed = 0.2 |
134 |
} |
135 |
if (global.item_used_overworld != undefined) |
136 |
{ |
137 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
138 |
with (msg) |
139 |
{ |
140 |
switch global.item_used_overworld |
141 |
{ |
142 |
case "Lukewarm Coffee": |
143 |
message[0] = "* (You pour the warm coffee# onto the pole. The ice starts# to melt.)" |
144 |
other.waiter = 1 |
145 |
scr_item_removescr_item_removefunction scr_item_remove(argument0) //gml_Script_scr_item_remove
{
i = 1
while (i <= 8)
{
if (global.item_slot[i] == argument0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[(i + 1)]
i += 1
}
global.item_slot[8] = "Nothing"
return true;
}
else
{
if (i == 8)
return false;
i += 1
continue
}
}
} ("Lukewarm Coffee") |
146 |
break |
147 |
case "Hndw Coffee": |
148 |
other.talk = false |
149 |
message[0] = "* (You take out the cup of# coffee.)" |
150 |
other.waiter = 5 |
151 |
break |
152 |
default: |
153 |
message[0] = "* Naybe thome waum cawfee will# fwee ny poor tongue." |
154 |
other.talk = true |
155 |
other.waiter = 0 |
156 |
global.cutscene = false |
157 |
break |
158 |
} |
159 |
|
160 |
} |
161 |
if (!global.dialogue_open) |
162 |
global.item_used_overworld = undefined |
163 |
} |