How do I change the position between two instances?

Get help using Construct 2

Post » Sun Sep 17, 2017 9:25 pm

I am using the drag and drop behavior and when the instanced is dropped in another one I want that instances change its position but I don't know how to implement it. Could anyone help me with this?
B
4
S
2
Posts: 136
Reputation: 874

Post » Mon Sep 18, 2017 5:18 am

Use the trick with families.
Create a family with just this one object. Then you will be able to refer two different instances of this object in one event. Like this:
Image
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 839
Reputation: 28,487

Post » Mon Sep 18, 2017 10:16 am

dop2000 wrote:Use the trick with families.
Create a family with just this one object. Then you will be able to refer two different instances of this object in one event. Like this:
Image


@dop2000

I saw that you use a distance of 100 pixels for each one but in my case I will work with more than 2 instances. So I intend to register its positions in two local variables (positionX, positionY) and use them to define the place of each instance that I am changing.

Thanks, this solution worked very well.
B
4
S
2
Posts: 136
Reputation: 874


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests