combo attack system blocked by movement code

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By chris33556

I have this test scene where my player has a combo fighting system. with that is a movement script too. However, the movement script seems to be conflicting with the combo attacks meaning the frames for the combo seem to play either too fast or they look like there prevented from playing the frames by the movement . can someone have a look at this and see what mistake there is in the script ?

i’ve tried a simpler movement method like if/ else /elif and the combo works but i require this particular script movement in the picture. any suggestions would be grateful

:bust_in_silhouette: Reply From: LordBoots

Because I don’t have the rest of your code I cant make a solid guess as to what is happening although, your code doesn’t appear to be stopping the walk/idle animations if attacking.

movement.x = speed * Input.get_axis("ui_left", "ui_right")
movement.z = speed * Input.get_axis("ui_up", "ui_down")

This is running every frame with no conditions.

best I could suggest is to indent this code under an if not isAttacking: condition.