| 1 |
depth = -y; |
| 2 |
var audio_sound_gain_radio = audio_sound_get_gain(obj_radio.current_song); |
| 3 |
var audio_sound_gain_gramophone = audio_sound_get_gain(mus_dalventertainer); |
| 4 |
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)) && (audio_sound_gain_radio == 1 || audio_sound_gain_gramophone == 1)) |
| 5 |
waiter = 1; |
| 6 |
if (global.route != 3) |
| 7 |
{ |
| 8 |
if (!audio_is_playing(mus_dalventertainer)) |
| 9 |
{ |
| 10 |
if (waiter == 1) |
| 11 |
{ |
| 12 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 13 |
with (msg) |
| 14 |
{ |
| 15 |
portrait = false; |
| 16 |
sndfnt = 99; |
| 17 |
message[0] = "* (It's a gramophone.)"; |
| 18 |
message[1] = "* (It looks pretty old.)"; |
| 19 |
message[2] = "* (Maybe it's a grandmaphone.)"; |
| 20 |
message[3] = "* (A record labeled \"Dalv Organ# Demo\" is queued up to play.)"; |
| 21 |
message[4] = "* (Play it?)"; |
| 22 |
if (outcome >= 1 && outcome <= 2 && message_current == 4) |
| 23 |
{ |
| 24 |
if (outcome == 1) |
| 25 |
obj_dalvsroom_gramophone.waiter = 2; |
| 26 |
else |
| 27 |
obj_dalvsroom_gramophone.waiter = 4; |
| 28 |
} |
| 29 |
if ((message_current + 1) == 4) |
| 30 |
{ |
| 31 |
ch_msg = 4; |
| 32 |
ch[1] = "Yes"; |
| 33 |
ch[2] = "No"; |
| 34 |
} |
| 35 |
} |
| 36 |
} |
| 37 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
| 38 |
{ |
| 39 |
with (obj_radio) |
| 40 |
audio_sound_gain(current_song, 0, 1000); |
| 41 |
waiter++; |
| 42 |
} |
| 43 |
if (waiter == 3) |
| 44 |
{ |
| 45 |
with (obj_radio) |
| 46 |
{ |
| 47 |
var audio_gain = audio_sound_get_gain(current_song); |
| 48 |
if (audio_gain == 0) |
| 49 |
{ |
| 50 |
audio_stop_sound(current_song); |
| 51 |
with (obj_dalvsroom_gramophone) |
| 52 |
{ |
| 53 |
audio_sound_gain(mus_dalventertainer, 1, 0); |
| 54 |
audio_play_sound(mus_dalventertainer, 1, 0); |
| 55 |
image_speed = 0.26666666666666666; |
| 56 |
waiter = 0; |
| 57 |
obj_pl.alarm[0] = 1; |
| 58 |
} |
| 59 |
} |
| 60 |
} |
| 61 |
} |
| 62 |
if (waiter == 4) |
| 63 |
{ |
| 64 |
waiter = 0; |
| 65 |
obj_pl.alarm[0] = 1; |
| 66 |
with (obj_dialoguebox_dummy) |
| 67 |
instance_destroy(); |
| 68 |
} |
| 69 |
} |
| 70 |
else |
| 71 |
{ |
| 72 |
if (waiter == 1) |
| 73 |
{ |
| 74 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 75 |
with (msg) |
| 76 |
{ |
| 77 |
if (!instance_exists(obj_dialoguebox_dummy)) |
| 78 |
instance_create(0, 0, obj_dialoguebox_dummy); |
| 79 |
portrait = false; |
| 80 |
sndfnt = 99; |
| 81 |
message[0] = "* (The record must be damaged or# broken.)"; |
| 82 |
message[1] = "* (Stop this wretched music?)"; |
| 83 |
if (outcome >= 1 && outcome <= 2 && message_current == 1) |
| 84 |
{ |
| 85 |
if (outcome == 1) |
| 86 |
obj_dalvsroom_gramophone.waiter = 2; |
| 87 |
else |
| 88 |
obj_dalvsroom_gramophone.waiter = 4; |
| 89 |
} |
| 90 |
if ((message_current + 1) == 1) |
| 91 |
{ |
| 92 |
ch_msg = 1; |
| 93 |
ch[1] = "Yes"; |
| 94 |
ch[2] = "No"; |
| 95 |
} |
| 96 |
} |
| 97 |
} |
| 98 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
| 99 |
{ |
| 100 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 101 |
with (msg) |
| 102 |
{ |
| 103 |
portrait = false; |
| 104 |
sndfnt = 99; |
| 105 |
message[0] = "* (You turn off the gramophone.)"; |
| 106 |
message[1] = "* (Maybe it's a work in# progress.)"; |
| 107 |
choice = false; |
| 108 |
} |
| 109 |
audio_sound_gain(mus_dalventertainer, 0, 1000); |
| 110 |
waiter++; |
| 111 |
} |
| 112 |
if (waiter == 3 && !instance_exists(obj_dialogue)) |
| 113 |
{ |
| 114 |
instance_destroy(obj_dialoguebox_dummy); |
| 115 |
var audio_gain = audio_sound_get_gain(mus_dalventertainer); |
| 116 |
if (audio_gain == 0) |
| 117 |
{ |
| 118 |
audio_stop_sound(mus_dalventertainer); |
| 119 |
with (obj_radio) |
| 120 |
{ |
| 121 |
audio_sound_gain(current_song, 1, 0); |
| 122 |
audio_play_sound(current_song, 1, true); |
| 123 |
with (obj_dalvsroom_gramophone) |
| 124 |
{ |
| 125 |
image_speed = 0; |
| 126 |
image_index = 0; |
| 127 |
waiter = 0; |
| 128 |
obj_pl.alarm[0] = 1; |
| 129 |
} |
| 130 |
} |
| 131 |
} |
| 132 |
} |
| 133 |
if (waiter == 4) |
| 134 |
{ |
| 135 |
waiter = 0; |
| 136 |
obj_pl.alarm[0] = 1; |
| 137 |
with (obj_dialoguebox_dummy) |
| 138 |
instance_destroy(); |
| 139 |
} |
| 140 |
} |
| 141 |
} |
| 142 |
else |
| 143 |
{ |
| 144 |
if (waiter == 1 && !instance_exists(obj_dialogue)) |
| 145 |
{ |
| 146 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 147 |
with (msg) |
| 148 |
{ |
| 149 |
portrait = false; |
| 150 |
sndfnt = 99; |
| 151 |
message[0] = "* (An old gramophone.)"; |
| 152 |
message[1] = "* (You spare yourself by not# playing the record on it.)"; |
| 153 |
} |
| 154 |
waiter++; |
| 155 |
} |
| 156 |
if (waiter == 2) |
| 157 |
waiter = 0; |
| 158 |
} |
| 159 |
if (!audio_is_playing(mus_dalventertainer)) |
| 160 |
{ |
| 161 |
image_speed = 0; |
| 162 |
image_index = 0; |
| 163 |
} |