Background Scrolling and the Layout Object questio

For questions about using Classic.

Post » Mon Jul 01, 2013 3:32 am

Hello again. RandomDood with another random question.

I am using multiple layout objects to show parts of scenes from other layouts. However when I change the scrolling rate of the layers for those layouts, they don't scroll at the rate I set in the layout objects are using.

Can someone help me?
B
3
S
1
Posts: 59
Reputation: 568

Post » Mon Jul 01, 2013 6:18 pm

I remember the layout object didn't work so great/might have been buggy, can you give an example cap file?
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Tue Jul 02, 2013 6:31 am

https://www.dropbox.com/s/gnfogztoq5w1h4w/LayoutObjScrollNoWork.cap

I made this quick example which is pretty much the issue. I have 2 layouts, layout 1 has a layout object that displays layout 2. Layout 2 has 3 layers each with objects and different scroll X rates (the darker the object the lower the layer its on) Normally a layer with a lower scroll rate would move slower than the others, but it does not show this in layout 1 with the layout object.
B
3
S
1
Posts: 59
Reputation: 568

Post » Tue Jul 02, 2013 4:33 pm

Yeah, this looks like an issue in the layer object from what I can see. Is there any reason why you're using layer object to do this though? (eg: to re-use skyboxes?)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Tue Jul 02, 2013 8:37 pm

Multiple levels that are all interconnected. I was using the Layout object to display parts of different levels/layouts and their changes in real time. And that skybox thing isn't a bad idea either.

My area of practice is art so sometimes I can get a little obsessed with getting everything to look visually perfect.
B
3
S
1
Posts: 59
Reputation: 568

Post » Thu Jul 04, 2013 8:37 pm

Would anyone happen to know what formula or code the scrolling uses in the program? I could hard code the movements in directly as a work around.
B
3
S
1
Posts: 59
Reputation: 568

Post » Wed Jul 10, 2013 4:03 am

You could instead do this for each object:

Start of layout: object.value('offsetX') = object.X - ScrollX

Always: Set object.X to ScrollX + object.value('offsetX')

And I think that'd scroll it as you move the screen, not sure as I haven't tested
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests