How do I Scale a Layer with Scale Rate set to 0?

Get help using Construct 2

Post » Wed Sep 07, 2016 10:48 am

Is there an easy way to scale a layer that has its layer scale set to 0?

For example, I'm changing the canvas size & layout scale to handle different resolutions in a window for performance reasons. This value is set at runtime, so it needs to be able to change. If all layers in a layout have scale rate set to 100, things behave as expected.

I can understand why scaling the full layout may confuse the layer a little bit as to what to do since its scale rate is set to 0, but if I'm manually scaling a layer, I'm kind of expecting it to scale. However, I don't seem to be able to alter the size of layers using either layout scale or layer scale if the scale rate is set to 0. I'd think that if I were setting the scale manually, it wouldn't matter what the scale rate is set to, but before I report it as any kind of issue I'd be curious if to hear if anyone has run into this issue and found a good way to solve it (or maybe I'm doing something wrong).

Any insight would be appreciated. Thanks!

cc @Ashley
B
76
S
43
G
24
Posts: 525
Reputation: 20,555

Post » Wed Sep 07, 2016 12:09 pm

Under Layer properties , have you changed the scale rate from 100 or parallax from 100,100 ?
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Wed Sep 07, 2016 7:25 pm

emoaeden wrote:Under Layer properties , have you changed the scale rate from 100 or parallax from 100,100 ?


Yep. Scale Rate & Parallax set to 0.

EDIT:
@Ashley

I was expecting to be able to manually scale a layer when I scale a layout, even if the Scale Rate is set to 0, or at least scale a layer through events even if the Scale Rate is set to 0. Is there any way to get this to happen? According to the manual, LayerScale is separate from LayoutScale, so I figured I'd be able to manipulate them separately - is that not the case? I notice for the actions to set layer scale it says it takes scale rate into effect, which may not always be the desired outcome.

In short, I guess I'm looking for a way to scale layers while ignoring the layer's Scale Rate. Seems like it'd be a very useful feature and would simplify a whole lot of GUI stuff when changing layout scale or canvas res. Something that, if scale rate/parallax are set to 0, I can still manually set the layer scale.
B
76
S
43
G
24
Posts: 525
Reputation: 20,555


Return to How do I....?

Who is online

Users browsing this forum: Fradno and 15 guests