1 |
script_execute(gml_Script_scr_controls_text) |
2 |
if key_revert_pressed |
3 |
{ |
4 |
characters = message_length |
5 |
message_draw = string_copy(message[message_current], 0, characters) |
6 |
} |
7 |
if (characters < message_length) |
8 |
{ |
9 |
if (counter == 0) |
10 |
{ |
11 |
script_execute(gml_Script_scr_text_increase) |
12 |
script_execute(gml_Script_scr_talking_normal) |
13 |
} |
14 |
else |
15 |
can_talk = false |
16 |
} |
17 |
else if (characters == message_length) |
18 |
{ |
19 |
can_talk = false |
20 |
if (message_current == (con_message_number - 1) && no_loop == false && item_category == "consumable") |
21 |
{ |
22 |
alarm[0] = 20alarm[0]var item_slot = global.item_slot[global.item_pause_screen_number]
var game_mode = global.game_mode
if (game_mode == "customs")
{
if (item_slot == "Hot Dog...?")
{
global.current_hp_self += global.max_hp_self
if (global.current_hp_self > global.max_hp_self)
global.current_hp_self = global.max_hp_self
audio_play_sound(snd_borfborf, 20, false)
}
}
else if (game_mode == "yellow")
{
if (item_type == "healing")
{
if (global.current_hp_self > global.max_hp_self)
return;
global.current_hp_self += item_number
if (global.current_hp_self > global.max_hp_self)
global.current_hp_self = global.max_hp_self
}
else if (item_type == "protection")
{
global.current_pp_self += item_number
if (global.current_pp_self > global.max_pp_self)
global.current_pp_self = global.max_pp_self
}
else if (item_type == "speed")
{
global.current_sp_self += item_number
if (global.current_sp_self > global.max_sp_self)
global.current_sp_self = global.max_sp_self
}
audio_play_sound(item_sound, 20, false)
}
message_current += 1
message_length = string_length(message[message_current])
characters = 0
message_draw = "" |
23 |
no_loop = true |
24 |
} |
25 |
else if key_select_pressed |
26 |
{ |
27 |
var case_end = false |
28 |
if (message_current < message_end && (!((message_current == (con_message_number - 1) && item_category == "consumable")))) |
29 |
{ |
30 |
message_current += 1 |
31 |
message_length = string_length(message[message_current]) |
32 |
characters = 0 |
33 |
message_draw = "" |
34 |
} |
35 |
else if (message_current == message_end) |
36 |
{ |
37 |
if (item_category == "consumable") |
38 |
{ |
39 |
for (i = global.item_pause_screen_number; i < 8; i += 1) |
40 |
global.item_slot[i] = global.item_slot[(i + 1)] |
41 |
global.item_slot[8] = "Nothing" |
42 |
} |
43 |
case_end = true |
44 |
} |
45 |
if (case_end == true) |
46 |
{ |
47 |
global.text_box_open = false |
48 |
with (obj_stats_screen_pause_screen_overworld) |
49 |
instance_destroy() |
50 |
with (obj_main_selection_pause_screen_overworld) |
51 |
instance_destroy() |
52 |
with (obj_frisk) |
53 |
moveable = true |
54 |
instance_destroy() |
55 |
} |
56 |
} |
57 |
} |
58 |
script_execute(gml_Script_scr_text_counter) |