Attach sword to a pinned chain of sprites

Get help using Construct 2

Post » Sat May 25, 2013 11:09 pm

I'm trying to get it so that when I press and move on my joystick, a sword and arms will pop out, but the sword is restricted to the arms length. And the point of the sword mimics what the thumb is drawing on the joystick, so it's kind of like being pulled by the tip of the sword.

It starts at Event 83 and goes to 88. Any help is greatly appreciated

https://www.dropbox.com/s/uxdwoc4vh0af7bi/25-MAY-13%20-%20Changed%20to%20virtual%20joystick.capx bscarl882013-05-25 23:44:31
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Tue May 28, 2013 10:39 pm

Let me better explain...

The right side of the screen will be where the joystick/mousepad is. While the player uses the mousepad on the right, the end point of the forearm (pretty much the wrist) I need it to mimic what the thumb is doing on the right, but it will be placed on the player. If the thumb extends past the reaching point of what the arm allows, i don't want it to break the arm, I want it to still follow the finger, but at an offset pretty much. My joystick is kinda setup to allow this already.    
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Tue May 28, 2013 11:48 pm

I think you just want to set the arm angle to the thumbstick angle. Though I also had to rotate the arm and sword 90 degrees clockwise so that they are facing right (towards 0 degrees).

https://dl.dropboxusercontent.com/u/8367729/construct/example/25-MAY-13%2520-%2520Changed%2520to%2520virtual%2520joystick_edit.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Wed May 29, 2013 12:01 am

I forgot to mention I plan on having 2 arms to simulate a forearm and arm, and possibly wrist, so i'll need to be able to tug and pull on it, and when I push it in, the arms fold , but when I pull it back out, the arms unfold
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Thu May 30, 2013 1:11 am

I have an idea....   So i made a sprite called "MotionDot" This dot is spawned on my VirtualControls layer, and is pinned to my joystick's thumbstick. This way, when the thumbstick moves, the MotionDot mimics it. Then I attached my sword to the dot. It works nearly exactly how I want it, but how do I get the sword movement area to move with the player? It will spawn on the player, but then the sword movement will stay in place instead of following nthe player. It's so close!

(Events 105 - 107) click and drag on the online joystick
https://www.dropbox.com/s/l3t7uxsnhbn8uwp/27-MAY-13%20-%20created%20Flying%20Tool.capx

And how do i minimize how much the red dot moves in compared to the ThumbStick? So I don't make his arm come too far off his bodybscarl882013-05-30 04:05:56
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Thu May 30, 2013 12:45 pm

Check it out: joystickArmControl.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Thu May 30, 2013 11:09 pm

Did you eveeerr knoooow that you're my heeeerooooo

Seriously, love you, this is exactly what I wanted! And your sword is way cooler than mine lol.

Is there any performance difference do you know from using my joystick compared to your joystick? I gotta save all the I can get since I want to put this on mobile.   And do you care if I create my joystick like yours?
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Fri May 31, 2013 12:17 am

Hey @Ramones, thanks again for your help, I sent you a PM with a possible offer too.bscarl882013-06-01 00:11:40
B
32
S
4
Posts: 405
Reputation: 3,219


Return to How do I....?

Who is online

Users browsing this forum: Mirlas, TELLES0808 and 20 guests