S
Sahibjot Cheema
Guest
I want to hold x to hold out you shield but if you press shift then it will switch weapon to sword.
The problem is that holding x and pressing shift at the same time glitches the shield. The sprite is stuck on holding the shield but u have the effects of not holding it out. It fixes it self if u let go of x and press shift again.
I think the problem is that the code for x keeps running until its let go but i want it to update when u press shift.
The problem is that holding x and pressing shift at the same time glitches the shield. The sprite is stuck on holding the shield but u have the effects of not holding it out. It fixes it self if u let go of x and press shift again.
I think the problem is that the code for x keeps running until its let go but i want it to update when u press shift.
kActionHold = keyboard_check(ord("X"))
if (weapon == SHIELD) {
if (kActionHold) {
if (!action) {
// Shield Wall Action
if ((cRight || cLeft) && !onGround) {
sprite_index = PlayerActionWallSlide_Shield;
action = true;
// Dash Shield Action
}else if (state == DASH) {
sprite_index = PlayerDashAction_Shield;
alarm[1] = 12;
action = true;
// Shield Block
} else {
sprite_index = PlayerAction_Shield;
action = true;
}
}
} else action = false;
}
if (kChange) {
if (weapon = SWORD) weapon = SHIELD;
else if (weapon = SHIELD) weapon = SWORD;
}
if (weapon == SHIELD) {
if (kActionHold) {
if (!action) {
// Shield Wall Action
if ((cRight || cLeft) && !onGround) {
sprite_index = PlayerActionWallSlide_Shield;
action = true;
// Dash Shield Action
}else if (state == DASH) {
sprite_index = PlayerDashAction_Shield;
alarm[1] = 12;
action = true;
// Shield Block
} else {
sprite_index = PlayerAction_Shield;
action = true;
}
}
} else action = false;
}
if (kChange) {
if (weapon = SWORD) weapon = SHIELD;
else if (weapon = SHIELD) weapon = SWORD;
}