How do I keep weapons in character hands at all times

Get help using Construct 2

Post » Mon Feb 16, 2015 7:03 pm

I created a character and animated him. I created a sword and animated it by his movement. They are each in separate layers and I have a secondary image point set on his right hand for all of the frames of his animation. I have an image point set on the sword as well. Basically, the animation works pretty good if I quickly press left or right and hold down those buttons (for like 5 seconds), but sometimes when I press the right arrow for only 2 seconds or 3 seconds the character slides in front of the sword and it no longer looks like he is holding it in his hand. If I just tap the left or right arrow it stays in his hand as it should. I'm wondering if this has anything to do with his speed, but I've also tried slowing him down and that doesn't fix things. I've tried using the stop animation function/feature, and I've also tried setting it to a StopMovement animation (1 frame) which I have for his sword as well (this is how i have it now)
Also, when he jumps, the sword does not follow him. I was going to put up a link to a Youtube video of it but it won't let me post it.
B
5
Posts: 6
Reputation: 237

Post » Mon Feb 16, 2015 7:07 pm

It would be more easy if you can share a .capx
B
77
S
22
G
10
Posts: 641
Reputation: 9,998

Post » Tue Feb 17, 2015 12:54 pm

Hello,

Maybe you should try the use the Pin behavior that is built-in Construct 2. You can choose to pin an object to another one with position, angle, or both. I think what you're trying to do is every tick set the sword on you character's image point, or move the two objects with same speed, which is not accurate.

Nabu
B
14
S
4
Posts: 108
Reputation: 1,279

Post » Sat Feb 21, 2015 5:00 pm

I changed things up a bit and used the pin option, but it wasn't working right. I tried to change things back to the way they were before, and used the system every tick set position to player's hand image point and now it's working fine, even when he jumps. Thanks for the advice. It's a miracle! :D
B
5
Posts: 6
Reputation: 237


Return to How do I....?

Who is online

Users browsing this forum: bbjGames, Iftikhar555, jpstudio, LaurenceBedford, Xeeko and 11 guests