|
1
|
if (init == 1)
|
|
2
|
{
|
|
3
|
init = 2;
|
|
4
|
input_timer = 0;
|
|
5
|
}
|
|
6
|
if (instance_exists(obj_heart))
|
|
7
|
{
|
|
8
|
var presstext;
|
|
9
|
if (obj_heart.color == 1)
|
|
10
|
{
|
|
11
|
if (con < 19)
|
|
12
|
{
|
|
13
|
presstext = stringsetloc(PRESS "PRESS ", "obj_ch2_sceneex2_special_slash_Draw_0_gml_16_0" );
|
|
14
|
if (!i_ex(obj_yheart_shot))
|
|
15
|
input_timer++;
|
|
16
|
else
|
|
17
|
input_timer = 0;
|
|
18
|
}
|
|
19
|
if (con >= 19)
|
|
20
|
{
|
|
21
|
presstext = stringsetloc(HOLD "HOLD ", "obj_ch2_sceneex2_special_slash_Draw_0_gml_23_0" );
|
|
22
|
var bigcheck = 0;
|
|
23
|
with (obj_yheart_shot)
|
|
24
|
{
|
|
25
|
if (big == 1)
|
|
26
|
bigcheck = 1;
|
|
27
|
}
|
|
28
|
if (obj_heart.z_hold >= 40)
|
|
29
|
presstext = stringsetloc(RELEASE "RELEASE ", "obj_ch2_sceneex2_special_slash_Draw_0_gml_27_0" );
|
|
30
|
if (bigcheck == 0)
|
|
31
|
input_timer++;
|
|
32
|
else
|
|
33
|
input_timer = 0;
|
|
34
|
}
|
|
35
|
}
|
|
36
|
if (input_timer >= 240)
|
|
37
|
{
|
|
38
|
draw_set_color(c_white);
|
|
39
|
scr_84_set_draw_fontscr_84_set_draw_font
function scr_84_set_draw_font(arg0)
{
global.chemg_font = arg0;
draw_set_font(scr_84_get_font(arg0));
} ("main");
|
|
40
|
if (global.is_console || obj_gamecontroller.gamepad_active)
|
|
41
|
{
|
|
42
|
if (global.lang == "en")
|
|
43
|
{
|
|
44
|
draw_set_alpha((sin(input_timer / 8) * 0.1) + 0.8);
|
|
45
|
draw_sprite_ext(scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[4], false), 0, obj_heart.x + 26, obj_heart.y - 26, 2, 2, 0, c_white, 1);
|
|
46
|
draw_text(obj_heart.x - 30, obj_heart.y - 20, presstext);
|
|
47
|
}
|
|
48
|
else
|
|
49
|
{
|
|
50
|
draw_set_alpha((sin(input_timer / 8) * 0.1) + 0.8);
|
|
51
|
draw_sprite_ext(scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[4], false), 0, obj_heart.x - 26, obj_heart.y - 32, 2, 2, 0, c_white, 1);
|
|
52
|
draw_text(obj_heart.x + 8, obj_heart.y - 26, presstext);
|
|
53
|
}
|
|
54
|
}
|
|
55
|
else
|
|
56
|
{
|
|
57
|
var buttontext = stringsetsubloc("~1", scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (4), "obj_ch2_sceneex2_special_slash_Draw_0_gml_39_0");
|
|
58
|
draw_set_alpha((sin(input_timer / 8) * 0.1) + 0.8);
|
|
59
|
draw_text(obj_heart.x - 30, obj_heart.y - 20, presstext + buttontext);
|
|
60
|
}
|
|
61
|
draw_set_alpha(1);
|
|
62
|
}
|
|
63
|
}
|