COMBO attacks moving animation

Get help using Construct 2

Post » Sun Dec 11, 2016 7:22 pm

hey ,
I am working now on a metroidvania sidescroller and having hard time with combo system. While I managed to get combo attack with different animations using timer, I don't know how to approach moving player's object to match with its animations' object.

Will try to explain this more clear:
For example I want my player to move forward while slashing with the sword ( with each attack it moves 1 step forward) , so I create the animation in wich player moves as he attacks, but what would be the logic to implement this ingame ? Was thinking to move player X pixels in the direction I need at but that would require to calculate the distante in the animation through trial and error a lot of times, and if it doesnt match it looks awkward and would be crazy hard to do this way when having air combos and so on. Any thoughts on this ?
B
9
S
3
Posts: 10
Reputation: 697

Post » Thu Dec 15, 2016 5:28 pm

bump :)
B
9
S
3
Posts: 10
Reputation: 697

Post » Tue Dec 20, 2016 2:50 am

This is just off the cuff and may not work with your events, but someone else might be able to correct me or provide a better way. You could try adding an instance variable and calling it a STATE - text - . So as the player is walking SET the STATE to "WALKING" (with quotes), if Attacking, Set the STATE to "ATTACKING."
In your events you could try (Press (whatever your attack key is) add condition - player's STATE = Walking, (or that last part might need to be made in to a sub-event) and then add action attack animation.

The other thing you could try is create an event:
PLAYER IS MOVING (The platform icon that is moving)
Button is pressed > Add action>Play Attack animation.

I'm learning myself, but people here have been pretty helpful, so if this doesn't work, I'm sure someone will figure it out. Good Luck.
B
33
S
15
G
10
Posts: 95
Reputation: 7,672

Post » Tue Dec 20, 2016 10:36 am

ninepixels wrote:hey ,
I am working now on a metroidvania sidescroller and having hard time with combo system. While I managed to get combo attack with different animations using timer, I don't know how to approach moving player's object to match with its animations' object.

Will try to explain this more clear:
For example I want my player to move forward while slashing with the sword ( with each attack it moves 1 step forward) , so I create the animation in wich player moves as he attacks, but what would be the logic to implement this ingame ? Was thinking to move player X pixels in the direction I need at but that would require to calculate the distante in the animation through trial and error a lot of times, and if it doesnt match it looks awkward and would be crazy hard to do this way when having air combos and so on. Any thoughts on this ?

Why not have 2 sprites (one for the legs and one for the body), animate the body for attack and idle and the legs for running and idle, pin them together and when the player presses "space" for example, body- play animation attack; legs- play animation running; legs/body (depending on which you pinned to which)- move at angle (0- right; 90- down; -90- up; 180- left) (Nr of pixels)

Like this you can have the player running (without attacking) without making another animation, and it's easier to make new attacks.

Let me know if it works!
ImageImageImageImage
B
30
S
9
G
7
Posts: 262
Reputation: 5,646

Post » Fri Dec 23, 2016 9:59 pm

hey, as soon as will get home will try both things, although the project is put on shelf for now. Thank you both!

TRMG - I can't reply to your pm ( I dont have those 500 points required). I'm on a new machine and don't have access to that project but from what I can remember I found how to do that on the forum in a topic with an example of shoot 'em up game. Maybe you could try and search, should be an easy find, I can't right now.
B
9
S
3
Posts: 10
Reputation: 697

Post » Fri Dec 23, 2016 11:31 pm

Combos like this? Image

You should store the attack command before executing it and trigger it ready, also, the attack condition should wait until the animation is finished.

This sample and template will be on sale soon. I get delayed with it because some milestones are making me rethink the entire event sheet to make it reach 50 events. Unfortunately it's currently using more than 100 and users of the free version will be unable to use it on their projects.
Image
B
108
S
24
G
18
Posts: 1,373
Reputation: 22,824


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 35 guests