I’ve got a new problem, i hope, you can help me
In the last time i’ve created a character with the 8 direction and the automatism system. Now i want to animate my character with an attack animation with the “a”-key. It works just a bit: When i hold the a key my character shows the animation once, but i want to press the button once without holding to see the complete animation. And when i hold the “a”-key i want to see the animation as a loop until the button is released. I’ve looked around for a delay action, but i’ve only seen the “timers”. Does anyone know how this works? I will try to create this continued.
Could you post a screenshot of your code or upload your file? I’m not exactly sure what your problem is without seeing it and I don’t want to give you a wrong explanation.
Okay, here are the screenshots:
My Player can now attack, but when i hold the key he don’t shows the animation, again, except when i move the player and i pressed the key. In this situation, it’s the “a”-key. I want to have that the player shows the attackanimation again and again, til i released the key. I don’t know how i can do this.
Why do you have arrow key conditions in your attack events? Put the attack animation event separately.
If key a is pressed || Do animation = 1
You can always put if key a is NOT pressed in your other animations if you want attack animation to take priority.
Fixed that, thank you. But one problem still remains: When i hold the “a”-key, my player don’t shows the animation a second time. It would be nice, when the character repeats the animation. Problem is, i’ve tried a lot of ways. I’ve used while, repeat and a timer to make this, but i don’t get it. Is there a way to repeat the animation of the attack until i released the key?
Key a is pressed
Animation of character is finished
Do = 1 to frame of animation of character
Play the animation of character
Alternately, there is also a loop animation button on the editor next to where you set the time between animation frames.
Okay i got t now. The problem i had was that i deactivated the loop animation button for the second animation (attack). I was a bit confused because the walking animation worked fine and not the attackanimation. Thanks again for the solution of the problem, Mats