Edge Scrolling Nuance

Get help using Construct 2

Post » Thu Jul 12, 2012 3:35 pm

More testing of concepts.

I made a side scrolling platform with edge scrolling.

https://docs.google.com/open?id=0B5puA55FudSeUXhDYTNsOG1NeWc

I used two objects (visible in the CAPX) that are invisible, rightEdge and leftEdge.

When you scroll over them the screen scrolls right or left.

This works perfect.

What I want now is for the scrollRate to increase the closer you are to the edge.

You will see my formula in the function but it does not work.

Any thoughts on my logic?

Thanks for the help!
B
12
S
1
G
1
Posts: 50
Reputation: 1,228

Post » Thu Jul 12, 2012 4:28 pm

I havent looked at your capx but Im just thinkin of how Id do it:

Say 100 is the max distance from the edge you want to start scrolling. 100 - the current distance from the edge clamped between 0 and your max speed then scroll by that amount.

As you get closer to the edge the distance will decrease and less value will be subtracted from 100. Using that value will make it scroll faster. Pretty simple
B
13
S
5
G
2
Posts: 306
Reputation: 3,262


Return to How do I....?

Who is online

Users browsing this forum: flemmig, MisterAqua, Nifl and 30 guests