1 |
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)) |
2 |
{ |
3 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
4 |
if (global.sworks_flag[24] == 0) |
5 |
{ |
6 |
with (msg) |
7 |
{ |
8 |
if (global.route == 3) |
9 |
{ |
10 |
message[0] = "* (A page of rambly writings# wastes away in the can.)" |
11 |
message[1] = "* (You take it.)" |
12 |
} |
13 |
else |
14 |
{ |
15 |
message[0] = "* (You reach into the trash# can...) " |
16 |
message[1] = "* (You pull out a crumpled up# essay titled \"Mixin' It Up!\") " |
17 |
message[2] = "* (It's typed in size 13 font to# better reach the minimum page# requirement... of 1.) " |
18 |
message[3] = "* (You stash the essay in your# mail bag.)" |
19 |
} |
20 |
} |
21 |
scr_mail_addscr_mail_addfunction scr_mail_add(argument0) //gml_Script_scr_mail_add
{
ds_list_add(global.mail_list, argument0)
if (irandom(global.spam_mail_chance) == 1)
{
show_debug_message("success")
ds_list_add(global.mail_list, choose("Spam Letter 1", "Spam Letter 2", "Spam Letter 3", "Spam Letter 4", "Spam Letter 5", "Spam Letter 6", "Spam Letter 7", "Spam Letter 8", "Spam Letter 9"))
global.spam_mail_chance = 30
}
else
global.spam_mail_chance = clamp((global.spam_mail_chance - 1), 1, 999)
scr_mail_sort()
} ("Mixin' It Up! (Essay)") |
22 |
global.sworks_flag[24] = 1 |
23 |
} |
24 |
else |
25 |
{ |
26 |
with (msg) |
27 |
message[0] = "* (Nothing useful here.)" |
28 |
} |
29 |
} |