How Keep X Constant If Moving Between Parallaxing Layers

Get help using Construct 2

Post » Sun Mar 08, 2015 1:41 am

Hello all, thanks you for looking.

I have an object that's created on layer 1 then moves its way upward through multiple parallaxing layers to layer 5.
So, Layer1 - 27/100 parallax
Layer2 - 42/100
Layer3 - 63/100
Layer4 - 100/100
Layer 5 110/100

Because the layers are moving at different speeds, their X coordinates appear at different points on the screen - so, the big question: Is there a formula to derive what the X should be in order to make the object appear to instantiate at the same point regardless of layer?

Thank you for your time. :)
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Sun Mar 08, 2015 10:35 am

Hi,

Check CanvasToLayerX in the manual.

https://www.scirra.com/manual/126/system-expressions
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Mon Mar 09, 2015 1:46 pm

Thanks so much, Spongehammer. This is exactly the direction I needed to go. I found this https://www.scirra.com/tutorials/1167/l ... er-example

Thanks for your help.
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Mon Mar 09, 2015 7:36 pm

@gamecherry

My pleasure :)
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180


Return to How do I....?

Who is online

Users browsing this forum: ColombageEnPLS, R0J0hound, RohitIslam, Sealz and 2 guests