I’m having trouble having my character attack when you press the A button. It either doesn’t animate or always attacks to the right.
Can someone please help me with this?
I’m having trouble having my character attack when you press the A button. It either doesn’t animate or always attacks to the right.
Can someone please help me with this?
I hope no one has already replied and it just hasn’t been approved yet because that just gets awkward.
Anyway, the problem is that the game knows when you are moving left or right or up or down, but not where you are facing. So I literally just did this:
I’m sure you can see this difference. Now the game knows where you are facing, you will attack in the right direction!
Great artwork on the water!
The issue was that you were setting the character animation only when the player was moving, not when they were facing any direction. This means the ‘facing’ property was never assigned a value. In order for your ‘if facing’ statement to work when determining which direction to attack, I added character animations for when the player stops moving and faces a direction.
Thanks both of you : D