1 |
script_execute(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(scr_text_increase); |
12 |
script_execute(scr_talking_normal); |
13 |
} |
14 |
else |
15 |
{ |
16 |
can_talk = false; |
17 |
} |
18 |
} |
19 |
else if (characters == message_length) |
20 |
{ |
21 |
can_talk = false; |
22 |
if (message_current == (con_message_number - 1) && no_loop == false && item_category == "consumable") |
23 |
{ |
24 |
alarm[0] = 20;gml_Object_obj_text_use_item_selection_pause_screen_overworld_Alarm_0.gmlvar 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)
exit;
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 = ""; |
25 |
no_loop = true; |
26 |
} |
27 |
else if (key_select_pressed) |
28 |
{ |
29 |
var case_end = false; |
30 |
if (message_current < message_end && !(message_current == (con_message_number - 1) && item_category == "consumable")) |
31 |
{ |
32 |
message_current += 1; |
33 |
message_length = string_length(message[message_current]); |
34 |
characters = 0; |
35 |
message_draw = ""; |
36 |
} |
37 |
else if (message_current == message_end) |
38 |
{ |
39 |
if (item_category == "consumable") |
40 |
{ |
41 |
for (i = global.item_pause_screen_number; i < 8; i += 1) |
42 |
global.item_slot[i] = global.item_slot[i + 1]; |
43 |
global.item_slot[8] = "Nothing"; |
44 |
} |
45 |
case_end = true; |
46 |
} |
47 |
if (case_end == true) |
48 |
{ |
49 |
global.text_box_open = false; |
50 |
with (obj_stats_screen_pause_screen_overworld) |
51 |
instance_destroy(); |
52 |
with (obj_main_selection_pause_screen_overworld) |
53 |
instance_destroy(); |
54 |
with (obj_frisk) |
55 |
moveable = true; |
56 |
instance_destroy(); |
57 |
} |
58 |
} |
59 |
} |
60 |
script_execute(scr_text_counter); |