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, 120, obj_main_screen_shop) |
60 |
instance_create((obj_main_screen_shop.x + 210), obj_main_screen_shop.y, obj_item_description_screen_shop) |
61 |
instance_create(0, 0, obj_dialogue_buy_talk_shop) |
62 |
instance_create(0, 0, obj_text_item_talk_shop) |
63 |
instance_create((obj_main_screen_shop.x + 19), (obj_main_screen_shop.y + 19), obj_heart_buy_screen_shop) |
64 |
with (obj_talk_screen_shop) |
65 |
instance_destroy() |
66 |
instance_destroy() |
67 |
if (autoskip == true) |
68 |
{ |
69 |
with (obj_heart_buy_screen_shop) |
70 |
{ |
71 |
event_user(2) |
72 |
event_user(0) |
73 |
} |
74 |
} |
75 |
} |
76 |
} |
77 |
} |
78 |
script_execute(gml_Script_scr_text_counter) |
79 |
} |