| 1 |
depth = -y; |
| 2 |
if (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;
}
} () && keyboard_multicheck_pressed(0)) |
| 3 |
{ |
| 4 |
if (global.snowdin_flag[3] == 0) |
| 5 |
{ |
| 6 |
scr_textscr_textfunction 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 |
exit; |
| 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 |
{ |
| 34 |
slurpy_menu_open = true; |
| 35 |
} |
| 36 |
} |
| 37 |
if (!global.dialogue_open && slurpy_menu_open == true) |
| 38 |
{ |
| 39 |
instance_create(x, y, obj_item_use_menu); |
| 40 |
scr_cutscene_start(); |
| 41 |
slurpy_menu_open = false; |
| 42 |
} |
| 43 |
if (waiter == 1 && !global.dialogue_open) |
| 44 |
{ |
| 45 |
instance_create(x + 6, y - 5, part_smoke_slurpy); |
| 46 |
audio_play_sound(snd_puzzle_icemelt, 20, 0); |
| 47 |
waiter = 2; |
| 48 |
timer = 30; |
| 49 |
} |
| 50 |
if (waiter == 4 && !instance_exists(obj_dialogue)) |
| 51 |
{ |
| 52 |
if (place_free(x, y - 10)) |
| 53 |
{ |
| 54 |
vspeed = -3; |
| 55 |
sprite_index = spr_slurpy_up_yellow; |
| 56 |
} |
| 57 |
else |
| 58 |
{ |
| 59 |
hspeed = -3; |
| 60 |
sprite_index = spr_slurpy_left_yellow; |
| 61 |
} |
| 62 |
image_speed = 0.2; |
| 63 |
waiter = 5; |
| 64 |
} |
| 65 |
if (waiter == 5) |
| 66 |
{ |
| 67 |
with (msg) |
| 68 |
{ |
| 69 |
if (message_current == 1) |
| 70 |
other.talk = true; |
| 71 |
message[1] = "* Hey, hwat er you, crathy?"; |
| 72 |
message[2] = "* Thath thin iv thteaming!"; |
| 73 |
message[3] = "* I need thomething hot, but not# THAT hot!"; |
| 74 |
} |
| 75 |
if (!global.dialogue_open) |
| 76 |
{ |
| 77 |
scr_cutscene_end(); |
| 78 |
waiter = 0; |
| 79 |
} |
| 80 |
} |
| 81 |
if (timer > 0) |
| 82 |
{ |
| 83 |
timer--; |
| 84 |
} |
| 85 |
else if (timer != -1) |
| 86 |
{ |
| 87 |
if (waiter == 2) |
| 88 |
{ |
| 89 |
sprite_index = spr_slurpy_retract_yellow; |
| 90 |
instance_create(x, y, obj_lamppost); |
| 91 |
image_speed = 0.2; |
| 92 |
waiter = 3; |
| 93 |
timer = -1; |
| 94 |
} |
| 95 |
else if (waiter == 3) |
| 96 |
{ |
| 97 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 98 |
with (msg) |
| 99 |
{ |
| 100 |
portrait = false; |
| 101 |
message[0] = "* At last! I am liberated!"; |
| 102 |
message[1] = "* I cannot thank you enough!# You are a wonderful samaritan!"; |
| 103 |
message[2] = "* Here, a token of my gratitude."; |
| 104 |
message[3] = "* (You got a Silver Scarf.)"; |
| 105 |
message[4] = "* Knitted by my auntie with# abundant passion!"; |
| 106 |
message[5] = "* May it warm your skin, and# your SOUL good fellow!"; |
| 107 |
message[6] = "* Now, I must get home post-haste!# Mother is bound to be# perturbed already!"; |
| 108 |
message[7] = "* Farewell!"; |
| 109 |
if (message_current == 3) |
| 110 |
{ |
| 111 |
if (!scr_item_exists_check("Silver Scarf")) |
| 112 |
{ |
| 113 |
scr_item_removescr_item_removefunction scr_item_remove(arg0)
{
for (i = 1; i <= 8; i += 1)
{
if (global.item_slot[i] == arg0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[i + 1];
i += 1;
}
global.item_slot[8] = "Nothing";
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Lukewarm Coffee"); |
| 114 |
scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Silver Scarf"); |
| 115 |
other.talk = false; |
| 116 |
} |
| 117 |
} |
| 118 |
else if (message_current == 4) |
| 119 |
{ |
| 120 |
other.timer = -1; |
| 121 |
other.talk = true; |
| 122 |
other.waiter = 4; |
| 123 |
} |
| 124 |
else |
| 125 |
{ |
| 126 |
other.talk = true; |
| 127 |
} |
| 128 |
} |
| 129 |
} |
| 130 |
} |
| 131 |
if (instance_exists(obj_dialogue) && talk == true) |
| 132 |
{ |
| 133 |
if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current])) |
| 134 |
{ |
| 135 |
image_speed = 0; |
| 136 |
image_index = 0; |
| 137 |
} |
| 138 |
else |
| 139 |
{ |
| 140 |
image_speed = 0.2; |
| 141 |
} |
| 142 |
} |
| 143 |
if (global.item_used_overworld != undefined) |
| 144 |
{ |
| 145 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 146 |
with (msg) |
| 147 |
{ |
| 148 |
switch (global.item_used_overworld) |
| 149 |
{ |
| 150 |
case "Lukewarm Coffee": |
| 151 |
message[0] = "* (You pour the warm coffee# onto the pole. The ice starts# to melt.)"; |
| 152 |
other.waiter = 1; |
| 153 |
scr_item_removescr_item_removefunction scr_item_remove(arg0)
{
for (i = 1; i <= 8; i += 1)
{
if (global.item_slot[i] == arg0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[i + 1];
i += 1;
}
global.item_slot[8] = "Nothing";
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Lukewarm Coffee"); |
| 154 |
break; |
| 155 |
case "Hndw Coffee": |
| 156 |
other.talk = false; |
| 157 |
message[0] = "* (You take out the cup of# coffee.)"; |
| 158 |
other.waiter = 5; |
| 159 |
break; |
| 160 |
default: |
| 161 |
message[0] = "* Naybe thome waum cawfee will# fwee ny poor tongue."; |
| 162 |
other.talk = true; |
| 163 |
other.waiter = 0; |
| 164 |
global.cutscene = false; |
| 165 |
break; |
| 166 |
} |
| 167 |
} |
| 168 |
if (!global.dialogue_open) |
| 169 |
global.item_used_overworld = undefined; |
| 170 |
} |