KyleRansford
Member
Hello, I'll try to explain what I mean, but I have a Input Object (o_input) that has all the controls for the character like:
Where in the part
"action_one_pressed = gamepad_button_check(xbox_controller, gp_face3) or keyboard_check_pressed(ord("D"));"
action_one_pressed is a Button or D Key press.
While looking at the other functions I can't find anything related to, for example, "action_one_pressed = tap on o_A_Button".
o_A_Button is an Object with a Tap event. So, instead of having to reinvent the wheel, can I assign the Object's Tap event to the action_one_pressed variable?
Asking because with the action_one_pressed variable I use it for weapons and choices, etc. like:
event_user(3) being an event to fire a bullet every time the player presses the A Button or the D Key. So instead of having to have the o_A_Button have a Tap event. Can I add the Tapping on the o_A_Button as an additional input in "code/variable" form?
Code:
action_one_pressed_ = gamepad_button_check_pressed(xbox_controller, gp_face1) or keyboard_check_pressed(ord("D"));
action_two_pressed_ = gamepad_button_check_pressed(xbox_controller, gp_face3) or keyboard_check_pressed(ord("A"));
action_three_pressed_ = gamepad_button_check_pressed(xbox_controller, gp_face4) or keyboard_check_pressed(ord("W"));
action_four_pressed_ = gamepad_button_check_pressed(xbox_controller, gp_face2) or keyboard_check_pressed(ord("S"));
action_one_ = gamepad_button_check(xbox_controller, gp_face3) or keyboard_check_pressed(ord("D"));
action_two_ = gamepad_button_check(xbox_controller, gp_face2) or keyboard_check_pressed(ord("A"));
action_three_ = gamepad_button_check(xbox_controller, gp_face4) or keyboard_check_pressed(ord("W"));
action_four_ = gamepad_button_check(xbox_controller, gp_face1) or keyboard_check_pressed(ord("S"));
xbox_controller = 0;
right_ = keyboard_check(vk_right) or gamepad_axis_value(xbox_controller, gp_axislh) > 0.50 or gamepad_button_value(xbox_controller, gp_padr);
left_ = keyboard_check(vk_left) or gamepad_axis_value(xbox_controller, gp_axislh) < -0.50 or gamepad_button_value(xbox_controller, gp_padl);
up_ = keyboard_check(vk_up) or gamepad_axis_value(xbox_controller, gp_axislv) < -0.40 or gamepad_button_value(xbox_controller, gp_padu);
down_ = keyboard_check(vk_down) or gamepad_axis_value(xbox_controller, gp_axislv) > 0.40 or gamepad_button_value(xbox_controller, gp_padd);
"action_one_pressed = gamepad_button_check(xbox_controller, gp_face3) or keyboard_check_pressed(ord("D"));"
action_one_pressed is a Button or D Key press.
While looking at the other functions I can't find anything related to, for example, "action_one_pressed = tap on o_A_Button".
o_A_Button is an Object with a Tap event. So, instead of having to reinvent the wheel, can I assign the Object's Tap event to the action_one_pressed variable?
Asking because with the action_one_pressed variable I use it for weapons and choices, etc. like:
Code:
if o_input.action_one_pressed_ {
audio_play_sound(a_laser, 1, false)
event_user(3);
}
Last edited: