How do I make my character move during an attack

Get help using Construct 2

Post » Sun Oct 22, 2017 8:56 pm

I'm using a varible canMove to set when character attack animation is playing, movement commands will not be played so the character wont do nothing while the attack animation is playing however I wan't the character to move a bit because the he is taking a step while attacking... I could remove the step and make him attack while standing still but I really want to make him move accordingly to his step.

I've tried setting a function to make him move simulating platform movement, and also tried setting X vector, both resulted on him only moving for a tick and then stopping even when I don't set the vector back to 0.

If it helps, the condition to make him attack is one trigger "if Keyboard A is pressed".

If this is impossible to do this with one trigger conditions can I have info on how to make attack animations without them?
B
5
S
1
Posts: 3
Reputation: 331

Post » Mon Oct 23, 2017 12:35 am

You could simply use the sprite set position or move at angle actions, using the suitable animation frame to trigger the action (seperate from the button press).
Mistakes were made.
B
57
S
28
G
115
Posts: 1,712
Reputation: 65,172

Post » Mon Oct 23, 2017 1:28 am

yes but doing this kinda teleports the object and I want it to move smoothly during the animation
Edit: but I am gonna try those things again but instead of doing on button press, on animation playing, thanks
Edit2: Yes, it worked perfectly setting X vector, however I had to stop the walking animation from playing when the attacking animation is playing. Thanks again for the help
B
5
S
1
Posts: 3
Reputation: 331


Return to How do I....?

Who is online

Users browsing this forum: AbusiveChAoS and 10 guests