How do I control the scale of each layer separately

Get help using Construct 2

Post » Thu Jun 15, 2017 3:40 pm

Is it possible to auterate the scale of a layer without affecting the others? Teno 3 layers, whenever I reduce the scale of one of them all the others are affected.

My intention was to use a layer on a normal scale (1.0), on it with a foreground platform, and a second layer on the background with a reduced scale (0.5) reprehending a platform far away.

Then, when the character jumped, there would be a transition effect from one layer to another reverting the scale value from 0.5 gradually to 1.0.

Similar to the game of Kirb, where the player can leave the platform closer to the screen to a platform in the background.
B
21
S
5
Posts: 59
Reputation: 1,283

Post » Thu Jun 15, 2017 5:41 pm

I think that you are using 'Set layout scale'
Got to use 'Set layer scale'

https://www.dropbox.com/s/wcrtfrxcs83ve ... .capx?dl=0

You can use 'Set layout scale', but then you have to fiddle with the Scale Rate property for the layers.

https://www.dropbox.com/s/d10aahxeebq0j ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Jun 15, 2017 6:32 pm

99Instances2Go wrote:I think that you are using 'Set layout scale'
Got to use 'Set layer scale'

https://www.dropbox.com/s/wcrtfrxcs83ve ... .capx?dl=0

You can use 'Set layout scale', but then you have to fiddle with the Scale Rate property for the layers.

https://www.dropbox.com/s/d10aahxeebq0j ... .capx?dl=0


Your example is incredible, thank you very much for the help.

I was not using the event that would scale the layout, but rather the layer event. Even so I'm not getting the effect I'd like.

Here's my .capx. I have platforms in the foreground, and another in the background. I would like the background map to be reduced as if it were distant and only stayed on the natural scale when the player jumped there.

https://drive.google.com/file/d/0BymfAv ... sp=sharing
B
21
S
5
Posts: 59
Reputation: 1,283

Post » Thu Jun 15, 2017 11:38 pm

That is a different question.
Each Parallaxed/scaled layer has its own coordinate system.

Platform is using the coordinate system from the layer it is on to calculate its stuff. It does not know where the stuff on other layers with different coordinate systems are.

This should not work. But here is some kind of dirty workarround.

https://www.dropbox.com/s/3prjbup90qvlr ... .capx?dl=0

You should make your own platform system in events and read those :
https://www.google.be/search?q=scirra+L ... scirra.com
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jun 16, 2017 1:39 am

99Instances2Go wrote:That is a different question.
Each Parallaxed/scaled layer has its own coordinate system.

Platform is using the coordinate system from the layer it is on to calculate its stuff. It does not know where the stuff on other layers with different coordinate systems are.

This should not work. But here is some kind of dirty workarround.

https://www.dropbox.com/s/3prjbup90qvlr ... .capx?dl=0

You should make your own platform system in events and read those :
https://www.google.be/search?q=scirra+L ... scirra.com



Thanks a lot for the help, I will research more about using the canvas. It has an R0J0hound plugin. Just do not have many examples of how to use.
B
21
S
5
Posts: 59
Reputation: 1,283


Return to How do I....?

Who is online

Users browsing this forum: irina and 6 guests