Hello! In my game, the characters consist of families. To create a new character I just needed to add new sprites to the family, and the code describing the family remained common to all characters. But I just can’t fix one mistake.
When the character goes to the right, he must turn the weapon to the right, and when he goes to the left, the weapon must turn to the left. But the turn of the weapon does not always take place, and often the characters go with their backs forward or the weapons look back.
Can you tell me what I did wrong?
Here is my code:
Here are the character sprites:
You can download project file here: