How do I drag container and have contents move?

Get help using Construct 2

Post » Mon May 19, 2014 12:46 am

Hey,
To improve my app, I would like to create 12 containers, inside each container a sprite representing one piano key.

How do make the key (sprite) move with the container?

What I have tried but didn't work is:
I've created a sprite, filled it with a grey color and named it to con1
Created a second sprite, adjusted the dimensions and filled it with red color.

Turned the first sprite into a container and picked the second sprite from the popup window.

Then I've attached a drag & drop behavior to the container.

Running this example lets me move the container but the sprite inside the container does not move along.

What am I missing?
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Mon May 19, 2014 1:04 am

you're missing the pin behavior :D

Manual entry
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Mon May 19, 2014 1:46 am

Thank you Sargas,
I will give that a try in a little while because the Windows machine is rendering something.

Ciao,
V
B
14
S
4
Posts: 190
Reputation: 1,735


Return to How do I....?

Who is online

Users browsing this forum: NN81, plinkie, sublimate, TsubaRu and 10 guests