attach last instance to object

Get help using Construct 2

Post » Sun Mar 04, 2012 12:44 pm

Using Yanns rope example I tried to modify it so I can replicate a effect I want.

I want to attach the last instance of the rope to be attached to the sprite on the opposite side of the layout, and fill the distance with the rope, Is this doable? Can anyone help me out?

Thanks.
B
8
S
2
G
4
Posts: 55
Reputation: 2,555

Post » Sun Mar 04, 2012 3:54 pm

You should probably link to that topic.

You need to look at the code which generates the rope, think about the distance() expression, and possibly divide that by the amount of rope segments you want?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sun Mar 04, 2012 3:58 pm

@sqiddster, Thanks for the reply. my bad, I though I attached my capx.

Here is my attempt: http://db.tt/vgNMVoeq

I am really struggling with this, any help would be appreciated.

Thanks,
B
8
S
2
G
4
Posts: 55
Reputation: 2,555

Post » Sun Mar 04, 2012 4:02 pm

Hmm, the rope itself seems a bit bugged to me.
It would probably be best to ask @Yann.
He's usually willing to help!
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sun Mar 04, 2012 4:14 pm

@sqiddster, Thanks for the help.

I'm sure @Yann is genius enough to figure this out for me .

I updated the capx if you want more of a understanding.

Thanks.
B
8
S
2
G
4
Posts: 55
Reputation: 2,555

Post » Sun Mar 04, 2012 4:18 pm

I would help more, but I never used rotational joints before! So I doubt I could do it.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sun Mar 04, 2012 7:54 pm

I modified an example I previously made
http://dl.dropbox.com/u/5426011/examples%209/rope2.capx
Is that what you are trying to achieve?
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Sun Mar 04, 2012 8:07 pm

Damn I like it, with families it's so much neater.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Mar 04, 2012 8:40 pm

@R0J0hound, WOW! Thanks, Exactly what I wanted, I'm trying to replicate a water effect. so this would be the wave, when something hits it. Ignoring collision by applying a force of 1 :)

I encountered a problem that maybe you can help me fix. If I set the window and layouts width to 960, the code works well making the line, but the line is too heavy so it makes a large dip which won't replicate my water effect. Do you know how I can fix this?

Thanks.
B
8
S
2
G
4
Posts: 55
Reputation: 2,555

Post » Sun Mar 04, 2012 9:19 pm

You could apply a upward force to the links to counteract gravity.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Next

Return to How do I....?

Who is online

Users browsing this forum: Matthew de, signaljacker and 0 guests