Moving sprite to 0 parallax layer

Get help using Construct 2

Post » Fri Sep 27, 2013 10:52 am

Hello, I am having a problem with layer parallaxes. I am trying to move one sprite from 100 parallax layer to 0 parallax layer and substain the sprites location on canvas.

Here is my .capx:
http://www.upload.ee/files/3607306/test.capx.html

Isntructions for testing:
1.swipe the layout forward
2.pick a family picture and drag it into the brown inventory bar.
3.drag the picture on top of the window, after drop it should slide back into its original position.

I would be very happy, if someone could solve this issue for me.
B
14
S
6
G
4
Posts: 107
Reputation: 4,868

Post » Fri Sep 27, 2013 1:34 pm

I haven't looked at your capx but try the LayerToCanvasX(layer, x, y) and LayerToCanvasY(layer, x, y) expressions.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Fri Sep 27, 2013 4:52 pm

yes, I have tried to use them, but don't really know how to get the right coordinates with them, I tried use viewports before and it worked for x coords but not when the y values changed. Could you take a look at my .capx and use the correct method.
B
14
S
6
G
4
Posts: 107
Reputation: 4,868

Post » Fri Sep 27, 2013 5:53 pm

moveToLayer.capx

I added a function to move an object from one layer to another.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Sat Sep 28, 2013 3:08 pm

Thank you, I really appreciate that you found time for my project.
B
14
S
6
G
4
Posts: 107
Reputation: 4,868


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 26 guests