1 |
var shop_name = global.shop_name |
2 |
if (action[message_current] != "Override") |
3 |
{ |
4 |
script_execute(gml_Script_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 |
characters = message_length |
18 |
message_draw = string_copy(message[message_current], 0, characters) |
19 |
} |
20 |
if (characters < message_length) |
21 |
{ |
22 |
if (counter == 0) |
23 |
{ |
24 |
script_execute(gml_Script_scr_text_increase) |
25 |
if (shop_name == "Hotel Shop") |
26 |
{ |
27 |
message_draw_alt = string_copy(message_alt[message_current], 0, characters) |
28 |
var message_alt_length = string_length(message_alt[message_current]) |
29 |
message_og_length = string_length(message[message_current]) |
30 |
if (message_alt_length > message_og_length) |
31 |
current_char = string_char_at(message_draw_alt, characters) |
32 |
} |
33 |
script_execute(talk_script[message_current]) |
34 |
} |
35 |
else |
36 |
can_talk = false |
37 |
} |
38 |
else |
39 |
{ |
40 |
can_talk = false |
41 |
if key_select_pressed |
42 |
{ |
43 |
if (message_current < message_end) |
44 |
{ |
45 |
message_current += 1 |
46 |
message_length = string_length(message[message_current]) |
47 |
characters = 0 |
48 |
message_draw = "" |
49 |
if (shop_name == "Hotel Shop") |
50 |
{ |
51 |
message_alt_length = string_length(message_alt[message_current]) |
52 |
if (message_alt_length > message_length) |
53 |
message_length = message_alt_length |
54 |
message_draw_alt = "" |
55 |
} |
56 |
} |
57 |
else |
58 |
{ |
59 |
instance_create(0, 0, obj_shop_fade_out_screen) |
60 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out
{
var snd = argument0
var fade_len = argument1
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) |
61 |
instance_destroy() |
62 |
} |
63 |
} |
64 |
} |
65 |
script_execute(gml_Script_scr_text_counter) |
66 |
} |