| 1 |
if (global.flag[17 Dalv fate] == 1) |
| 2 |
{ |
| 3 |
if ((keyboard_multicheck_pressed(0) && 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;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
| 4 |
waiter = 1; |
| 5 |
if (waiter == 1) |
| 6 |
{ |
| 7 |
scr_cutscene_start(); |
| 8 |
if (global.interaction_count_broom == 0) |
| 9 |
{ |
| 10 |
obj_dalv2.destination_x_dalv = obj_pl.x; |
| 11 |
obj_dalv2.destination_y_dalv = obj_pl.y + 20; |
| 12 |
} |
| 13 |
else |
| 14 |
{ |
| 15 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvroomhall; |
| 16 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvroomhall; |
| 17 |
} |
| 18 |
if (obj_dalv2.x == obj_dalv2.destination_x_dalv && obj_dalv2.y == obj_dalv2.destination_y_dalv) |
| 19 |
waiter++; |
| 20 |
} |
| 21 |
if (waiter == 2) |
| 22 |
{ |
| 23 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 24 |
with (msg) |
| 25 |
{ |
| 26 |
if (global.interaction_count_broom == 0) |
| 27 |
{ |
| 28 |
portrait = true; |
| 29 |
sndfnt = 100; |
| 30 |
message[0] = "* Be careful with that."; |
| 31 |
message[1] = "* That broom has been like# my best friend."; |
| 32 |
message[2] = "* I never thought he'd be# replaced by a real# friend!"; |
| 33 |
prt[0] = 1763; |
| 34 |
prt[1] = 1755; |
| 35 |
prt[2] = 1769; |
| 36 |
} |
| 37 |
else |
| 38 |
{ |
| 39 |
portrait = true; |
| 40 |
sndfnt = 100; |
| 41 |
message[0] = "* ..."; |
| 42 |
prt[0] = 1755; |
| 43 |
} |
| 44 |
} |
| 45 |
waiter++; |
| 46 |
} |
| 47 |
if (waiter == 3 && !instance_exists(obj_dialogue)) |
| 48 |
{ |
| 49 |
if (global.interaction_count_broom == 0) |
| 50 |
{ |
| 51 |
global.interaction_count_broom++; |
| 52 |
waiter++; |
| 53 |
} |
| 54 |
else |
| 55 |
{ |
| 56 |
waiter = 4; |
| 57 |
} |
| 58 |
} |
| 59 |
if (waiter >= 4 && waiter <= 5 && !instance_exists(obj_dialogue)) |
| 60 |
{ |
| 61 |
obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvroomhall; |
| 62 |
obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvroomhall; |
| 63 |
if (obj_dalv2.x == obj_dalv2.default_x_dalvroomhall && obj_dalv2.y == obj_dalv2.default_y_dalvroomhall) |
| 64 |
waiter++; |
| 65 |
} |
| 66 |
if (waiter == 6) |
| 67 |
{ |
| 68 |
global.cutscene = false; |
| 69 |
waiter = 0; |
| 70 |
obj_pl.alarm[0] = 1; |
| 71 |
} |
| 72 |
} |
| 73 |
else if (global.flag[17 Dalv fate] != 1 && global.route != 3) |
| 74 |
{ |
| 75 |
if ((keyboard_multicheck_pressed(0) && 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;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
| 76 |
waiter = 1; |
| 77 |
if (waiter == 1) |
| 78 |
{ |
| 79 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 80 |
with (msg) |
| 81 |
{ |
| 82 |
portrait = false; |
| 83 |
sndfnt = 99; |
| 84 |
message[0] = "* (It's a well worn broom.)"; |
| 85 |
obj_broom.waiter = 2; |
| 86 |
} |
| 87 |
} |
| 88 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
| 89 |
{ |
| 90 |
global.cutscene = false; |
| 91 |
waiter = 0; |
| 92 |
obj_pl.alarm[0] = 1; |
| 93 |
} |
| 94 |
} |
| 95 |
else if (global.route == 3) |
| 96 |
{ |
| 97 |
if ((keyboard_multicheck_pressed(0) && 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;
}
} () == true) && (waiter == 0 && !instance_exists(obj_dialogue))) |
| 98 |
waiter = 1; |
| 99 |
if (waiter == 1) |
| 100 |
{ |
| 101 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 102 |
with (msg) |
| 103 |
{ |
| 104 |
portrait = false; |
| 105 |
sndfnt = 99; |
| 106 |
message[0] = "* (A broom.)"; |
| 107 |
message[1] = "* (The wood is splintered.)"; |
| 108 |
obj_broom.waiter = 2; |
| 109 |
} |
| 110 |
} |
| 111 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
| 112 |
{ |
| 113 |
global.cutscene = false; |
| 114 |
waiter = 0; |
| 115 |
obj_pl.alarm[0] = 1; |
| 116 |
} |
| 117 |
} |