Terraria Sword Swing Advice

Get help using Construct 2

Post » Mon Nov 18, 2013 6:38 am

Im looking to get some help with my player attack.I want to make a sword swing motion like terraria and i have all the sprites to do so.I am failing at actually pinning and making the sword swing lined up with my arms swing animation.
The Terraria sword has an image point at the bottom of the hilt of the sword. And, it sets the position of that image point to the same position where the player's hand is every tick.
But how do i achieve this in construct? is it possible to recreate?
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 18, 2013 8:14 am

Cant you just set an imagepoint at the sword hilt, and go through your animation sprites and make sure that imagepoint is where you want it to be for each frame.

The set the swing animation to that imagepoint position each tick.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Nov 18, 2013 8:47 am

@cvp the issue im having is getting it to follow my arm attack animation.I understand the concept but im failing somewhere.
i have my image points set but i cant get my pickaxe to follow the image point like it should.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 18, 2013 8:49 am

Do you have an example capx? or could you make one(if you cant compromise your development)? then it might be easier to help.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Nov 18, 2013 8:58 am

Something like this?

.capx

Or am I not getting the point?

You are welcome to use the awesome graphics... no royalties needed
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Nov 18, 2013 10:12 am

@cvp

im not sure what im doing wrong but its not working the way it should for me,do i have to place the tool in the players hand like you are doing?

i have multiple animations if that helps to know.the sword/tool wont we out until the player swings.RookieDev2013-11-18 10:16:59
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 18, 2013 11:31 am

That should not be necessary. The set X and set Y is setting the position of the axe.

You just need to make sure you have the imagepoint on every frame of the animation you are attaching it to, and then make sure to attach the animation you are running to that imagepoint.

If you want you can throw me a personal message with your file, and I will be happy to help you out if I can.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Nov 18, 2013 8:58 pm

@cvp

im going to go ahead and send you that PM so you can check this out for me,Im not sure what i m doing wrong.I did everything like you said to do it.Thank you for ofering you help in the matter.
PM is coming your way.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 18, 2013 10:25 pm

I have send you a suggestion fix in a PM. Feel free to update the community with a note of what and how it works if it solves your problem cvp2013-11-18 22:25:47
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Nov 18, 2013 10:33 pm

@cvp

So in basic terms all i needed was this piece of information.
i knew i was doing something wrong,thank you for showing me how to attach angles to imagepoints through expressions.i never knew how to achieve that before.

angle(player_arms.X, player_arms.Y, player_arms.ImagePointX(1),player_arms.ImagePointY(1))
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 20 guests