How to make a stick man dangle

Get help using Construct 2

Post » Sat Mar 16, 2013 2:50 am

.CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6663023

I'm trying to set up a grapple hook feature where the player will left-hold to aim, and then release so a hookshot-like accessory will come flying out until it either enters "oblivion" (aka, outside the screen) or hits a solid object. Once it hits a solid object, Mr Stick will be reeled in as the chain "retracts" (the dots that represent the chain do not move during this process). When he is pulled up to the the Grapple, he should fall slightly and dangle from the Grapple.

Up to this point, I have a relatively bug-free success UP TO the Grapple firing and reeling in MrStick (my character) to wherever the Grapple has attached to.
But that's about the end of much of my progress...

DIRECTIONS:
To fire the Grapple, left-hold the mouse towards the box up on the far right. Release the button and MrStick should fly off, destroying the instances of the pixel chain sprites along the way (simulating a retraction of the chain).

FYI, I have temporarily disabled having the MrStickMain sprite set to the PlayerBox object (which houses the Platform behavior) while I work out this feature. This is sure to result in further problems when I re-engage the "Set To..." event. LOL

PROBLEM 1
After firing the Grapple and it hits a solid object, and upon being fully reeled in to the Grapple, I want MrStick to just kind of "fall" from whatever angle he is at while his hands "clasp" to the Grapple. So I'll pretty much need at least two things, I think: 1) a gravity effect to pull him downward from whichever angle he's at up to being fully reeled in, and 2) a physics hinge point for him to rotate on at the Grapple while gravity is effect on him. He'll stop falling once his angle is that which has him hanging down.

Note that in the Edit Animations for MrStickMain, the image are set to that it looks like he's stretched out horizontally. This is to account for the move forward dt*1000 pixels on line 43 (otherwise he'd fly off to his side! lol).

PROBLEM 2
Note that in Problem 1, I have you fire off at the box on the upper-right, to MrStick's right. Now, before you release the left-mouse button, move the pointer to Mr Stick's left and fire towards the box just above his head. You'll notice that he gets totally flipped over...and even flies away! I cannot account for this.

I've tried applying the Physics behavior to the Mr Stick sprite but I'm not sure which event/action feature to use. Can anyone see what I'm missing and suggest some solutions, please?
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
112
S
20
G
8
Posts: 741
Reputation: 13,636

Post » Sun Mar 17, 2013 12:35 am

*bump*
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
112
S
20
G
8
Posts: 741
Reputation: 13,636


Return to How do I....?

Who is online

Users browsing this forum: benajad, Braus, R0J0hound, shinkan and 16 guests