How do I pin together two instances of the same object?

Get help using Construct 2

Post » Tue May 26, 2015 4:07 am

I'm trying to make a game in which one of the mechanics is to attach two batteries together. I have a battery object type. I have cloned it a few times. It has DragDrop and Pin behaviors. I set up an Event on Battery so that when one Battery collides with another, I pin the battery.

This sort of works up to a point. When the first instance touches the 2nd, the 2nd sticks to it just as I want.

But as I move the first instance up, it "slips" against the 2nd battery and they are no longer attached the way they were originally; the 2nd battery is lower than the 1st.

Also, I can't then pin additional instances to the first one and have 3 or 4 of them all move together. It seems like an instance can only be pinned to one other instance, so a 2nd collision unpins it from the first.

There are other issues as well. Basically pin is not working as I would expect. How should I solve this?
B
3
Posts: 1
Reputation: 179

Post » Tue May 26, 2015 6:47 am

Make an invisible or hidden little sprite behind the first battery and pin the battery to that. Then pin all other batteries to that object as well? Would that avoid your problem?
I am working on a map with little flags on it. All instances of the same flag. Every time a new flag is placed it is pinned to the map and it works fine so i am guessing that would solved it. If not, perhaps you can post the file you are working on so i can try some things for you?
B
54
S
7
G
8
Posts: 150
Reputation: 5,817


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 12 guests