V
Valcia
Guest
so this is my code for animation transitioning
_keyL = keyboard_check_pressed(ord("L"));
_keyD = keyboard_check(ord("D"));
_keyA = keyboard_check(ord("A"));
_keySpace = keyboard_check_pressed(vk_space);
if (_keyL == true)
{
image_speed = 0.6;
sprite_index = spr_shield_combo1_R;
}
if(_keyD == true)
{
image_speed = 0.5;
sprite_index = spr_shield_run_right;
}
if(_keyA == true)
{
image_speed = 0.5;
sprite_index = spr_shield_run_left;
}
if (keyboard_check(vk_nokey))
{
image_speed = 0.2;
sprite_index = spr_shield_idle;
}
so when i write keyboard_checkbutton_pressed it is supposed to allow me to only click once and not hold on the button to perform the animation right?
But why is it that when i hold down on 'L' key. it will keep playing the animation im confuse?! Does keyboard_checkbutton_pressed not allow the player to only press button once and click again like the
jump button?
_keyL = keyboard_check_pressed(ord("L"));
_keyD = keyboard_check(ord("D"));
_keyA = keyboard_check(ord("A"));
_keySpace = keyboard_check_pressed(vk_space);
if (_keyL == true)
{
image_speed = 0.6;
sprite_index = spr_shield_combo1_R;
}
if(_keyD == true)
{
image_speed = 0.5;
sprite_index = spr_shield_run_right;
}
if(_keyA == true)
{
image_speed = 0.5;
sprite_index = spr_shield_run_left;
}
if (keyboard_check(vk_nokey))
{
image_speed = 0.2;
sprite_index = spr_shield_idle;
}
so when i write keyboard_checkbutton_pressed it is supposed to allow me to only click once and not hold on the button to perform the animation right?
But why is it that when i hold down on 'L' key. it will keep playing the animation im confuse?! Does keyboard_checkbutton_pressed not allow the player to only press button once and click again like the
jump button?