How do I pin an object to a moving object

Get help using Construct 2

Post » Thu Jan 28, 2016 3:51 pm

Hi, I wonder is someone could help?

i have 2 animations/objects 1 moving vertical, the other horizontal. I am after the vertical object to pin to the horizontal object. When they collide I need the horizontal object to drag the vertical object along. I have managed to get the vertical object to pin if you like, but I cant get the horizontal object to drag it along.

I hope it makes sense.

Any help would be awesome,

Thanks
B
6
Posts: 17
Reputation: 284

Post » Thu Jan 28, 2016 5:09 pm

One option would be to make a dummy vertical object already pinned to horizontal one On-create and then hid. Upon collide destroy the vertical object and unhide the dummy version. If you release the vertical one you could re-spawn it at location and hide dummy again. This way you won't have to worry about the controls for the vertical getting in the way (especially if you grouped them and then disabled group when dummy was active).
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
55
S
15
G
8
Posts: 610
Reputation: 8,796

Post » Thu Jan 28, 2016 10:05 pm

Ok thanks Chris, yea I can see where your going with it and fully understand.

I just thought there would be like a calculation. I am using the "set position to another object", with Image point, so I was presuming there was a calculation that could be done on the position of the moving object.

You know like the image point is a moving point so would it not be plus one or something.

Cheers John
B
6
Posts: 17
Reputation: 284

Post » Thu Jan 28, 2016 10:28 pm

I solved it, it needed to use "Set position" and then "position object" in that order, I had them the other way round, it works now!

Thanks again Chris
B
6
Posts: 17
Reputation: 284


Return to How do I....?

Who is online

Users browsing this forum: mekonbekon, ultrafop and 2 guests