Character arm joints and weapon problem

Get help using Construct 2

Post » Sat Mar 30, 2013 9:33 am

Hello, I decided to finally register and ask experts here because this problem is literally driving me crazy, I have spent two entire days trying to figure out how to do this, without success.

I absolutely love Construct 2. I am using it to create my vision of what a great game should be, I have been working at it for the past month doing character design and animation, inventory management, jetpack behavior, etc...
I'm very excited to share it with you all as soon as it meets the standards I'm aiming for. I believe this is something lots of people will have fun with. But for now, I simply can't figure out how to set the proper behavior for my character arms and weapon(s).

I have a sprite with the body only, sprites for upper arms, lower arms, hands and weapon(s), I have tried everything I could, set position on body from start, pin, apply physics, etc... I have read all the tutorials I could find on physics, tried to compare with existing capx exemples I could find in Construct 2 folder and on this forum, it just never behaves like I expect it... It either rotates like crazy, or explodes... I am almost starting to believe that it simply is too complex to be done that way.. but I have done other complex things like a whole inventory management with items positionning according to a whole lot of conditions so I don't know..    
The character is supposed to aim at 'Mouse.X & Mouse.Y' with the weapon, having upper arm pinned on 'position only' to ImagePoint1 on the body which is Left shoulder and the rest in the same logical way. Aiming up or down would make the arms and hand follow in a realistic/rope way.

I understand this might be quite a complex request (at least for me it's a total mistery so far on how to do this) but if you manage to see what I intend to do and can explain to me how to achieve it that would trully be amazing. I could keep moving forward on the game creation.

Here's a quick Capx I made to recreate the elements I'm working with.
http://dl.dropbox.com/u/995217/Arm%20joints%20and%20Weapon.capx

Also, If someone has a better way of doing it (also running and aiming at mouse with weapon, standing and keeping the aim), I'm interested in hearing your idea!

Thanks for reading me!
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Post » Sat Mar 30, 2013 11:26 am

It is actually quite simple. Set the angle of the arm to Mouse.X and Mouse.Y

Good luck with your game
B
10
S
1
Posts: 26
Reputation: 1,007

Post » Sat Mar 30, 2013 11:37 am

I wish it was that simple but it's not. If I do that, the elements don't remain linked to one another like they're supposed to.

Weapon attached to the body and rotating on it, hand attached to handle, lower arm attached to hand, upper arm pinned on body shoulder and attached to lower arm. All of this moving accordingly to the Weapon aiming at the Mouse and with the back arm and hand too.Telyko2013-03-30 11:38:12
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Post » Sat Mar 30, 2013 3:14 pm

Ah, yeah that is a lot more difficult. The main problem you have in the capx file is the way you set up the angles of the body parts in the beginning. Look at how I have set them up, all angle 0 and facing right.
I have a beginning here for you, don't want to do everything for you haha :P

Good luck

Donwload it here
B
10
S
1
Posts: 26
Reputation: 1,007

Post » Sat Mar 30, 2013 5:01 pm

Thank you! I will give a look at this as soon as I get home!
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Post » Sat Mar 30, 2013 5:13 pm

Construct considers the right side of the sprite to be the front. So all rotation should take that into account.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Sat Mar 30, 2013 6:45 pm

Biino I can't save your file, it redirects me to a "Server Error in '/' Application. The resource cannot be found. " page.
Alright for the starting angle, but what about linking them all between them? Should I use physics? I noticed it doesn't seem very reliable on small items or maybe is it just me setting things up the wrong way. Or should I use "pin"? Or are there any other better methods to do it?
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Post » Sun Mar 31, 2013 10:14 am

Can anyone help please?
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Post » Sun Mar 31, 2013 10:47 am

@Telyko, here's the link (right-click save-as): http://www.berryijmker.com/games/HelpbyBiino.capx
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sun Mar 31, 2013 11:28 am

Oh that seems like a nice base. I'm going to see if I can set it up the way I want now. I'll let you know!

Thank you!
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests