| 1 |
var shop_name = global.shop_name; |
| 2 |
if (action[message_current] != "Override") |
| 3 |
{ |
| 4 |
script_execute(scr_controls_text); |
| 5 |
if (key_revert_pressed) |
| 6 |
{ |
| 7 |
if (shop_name == "Hotel Shop") |
| 8 |
{ |
| 9 |
var message_og_length = string_length(message[message_current]); |
| 10 |
if (characters < message_og_length) |
| 11 |
characters = message_og_length; |
| 12 |
else |
| 13 |
characters = message_length; |
| 14 |
message_draw_alt = string_copy(message_alt[message_current], 0, characters); |
| 15 |
} |
| 16 |
else |
| 17 |
{ |
| 18 |
characters = message_length; |
| 19 |
} |
| 20 |
message_draw = string_copy(message[message_current], 0, characters); |
| 21 |
} |
| 22 |
if (characters < message_length) |
| 23 |
{ |
| 24 |
if (counter == 0) |
| 25 |
{ |
| 26 |
script_execute(scr_text_increase); |
| 27 |
if (shop_name == "Hotel Shop") |
| 28 |
{ |
| 29 |
message_draw_alt = string_copy(message_alt[message_current], 0, characters); |
| 30 |
var message_alt_length = string_length(message_alt[message_current]); |
| 31 |
var message_og_length = string_length(message[message_current]); |
| 32 |
if (message_alt_length > message_og_length) |
| 33 |
current_char = string_char_at(message_draw_alt, characters); |
| 34 |
} |
| 35 |
script_execute(talk_script[message_current]); |
| 36 |
} |
| 37 |
else |
| 38 |
{ |
| 39 |
can_talk = false; |
| 40 |
} |
| 41 |
} |
| 42 |
else |
| 43 |
{ |
| 44 |
can_talk = false; |
| 45 |
if (key_select_pressed) |
| 46 |
{ |
| 47 |
if (message_current < message_end) |
| 48 |
{ |
| 49 |
message_current += 1; |
| 50 |
message_length = string_length(message[message_current]); |
| 51 |
characters = 0; |
| 52 |
message_draw = ""; |
| 53 |
if (shop_name == "Hotel Shop") |
| 54 |
{ |
| 55 |
var message_alt_length = string_length(message_alt[message_current]); |
| 56 |
if (message_alt_length > message_length) |
| 57 |
message_length = message_alt_length; |
| 58 |
message_draw_alt = ""; |
| 59 |
} |
| 60 |
} |
| 61 |
else |
| 62 |
{ |
| 63 |
instance_create(0, 0, obj_shop_fade_out_screen); |
| 64 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(arg0, arg1)
{
var snd = arg0;
var fade_len = arg1;
if (!audio_is_playing(snd))
return false;
audio_sound_gain(snd, 0, fade_len);
if (instance_exists(obj_audio_fade_helper))
{
with (obj_audio_fade_helper)
{
if (audio_to_fade == snd)
return false;
}
}
with (instance_create(0, 0, obj_audio_fade_helper))
audio_to_fade = snd;
} (obj_shop_generator.shop_audio, 1300); |
| 65 |
instance_destroy(); |
| 66 |
exit; |
| 67 |
} |
| 68 |
} |
| 69 |
} |
| 70 |
script_execute(scr_text_counter); |
| 71 |
} |