What's the best way join physics sprites?

Get help using Construct 2

Post » Tue Nov 20, 2012 10:28 pm

I have a game with lots of instances of the same sprite. They all have the physics behaviour. When they collide, I'd really like them to stick together ... but I always end up with a expression that looks like "On collision with Sprite ... Add revolute joint to Sprite", which doesn't work (because I can't work out how to select two different instances of the same object inside a loop).

Below is a non-working example of what I'd like to achieve. The two balls should hit each other an join together in one physics object.

(Apparently, even though I've got a paid licence I can't post links ... so sorry I can't post an example...)

Any ideas on the best way to achieve this?

Benbenji7202012-11-20 22:31:58
Posts: 13
Reputation: 376

Post » Wed Nov 21, 2012 5:19 am

I think you could post the URL without hyperlink, will be easier for people to help with an example.
Posts: 42
Reputation: 4,875,331

Post » Thu Nov 22, 2012 1:38 am

Thanks. I worked out a way to do it with Families. Basically adding sprites to a family gives you the ability to "pick by UID", which is all I needed. Not sure why you need to use a family to access "pick by UID", but there you go.

I got the solution looking at the rope examples around the place.
Posts: 13
Reputation: 376

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests