Smoothly scroll 2 multiple objects

Get help using Construct 2

Post » Mon Aug 25, 2014 3:50 am

I currently have my player set with a scroll to behavior and want to trigger multiple scroll to objects on my layout. Problem is that when I trigger them, it's a immediate screen switch. Wonder how to gradually scroll to the new object.

Thanks in advance for any help.
B
12
S
3
G
1
Posts: 35
Reputation: 838

Post » Mon Aug 25, 2014 11:47 am

There is a scroll to event in system object. you can make it scroll to it directly or can can for instance gradually scroll to positions between them till you finally get to the other object.
I hope that was the answer you were looking for.
B
25
S
3
G
1
Posts: 67
Reputation: 2,971

Post » Mon Aug 25, 2014 1:06 pm

@Weleavefossils

Here is an example of scrolling between two objects in a very simple platformer with two playable characters:

ScrollBetweenObjects.capx


In the example I have an invisible object with the ScrollTo and Pin behaviours, and when I switch between objects to follow I Unpin the ScrollTo object, move it to the new object and then Pin it when it's very close.
You do not have the required permissions to view the files attached to this post.
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Mon Aug 25, 2014 1:28 pm

OddConfection wrote:@Weleavefossils

Here is an example of scrolling between two objects in a very simple platformer with two playable characters:

ScrollBetweenObjects.capx


In the example I have an invisible object with the ScrollTo and Pin behaviours, and when I switch between objects to follow I Unpin the ScrollTo object, move it to the new object and then Pin it when it's very close.

@OddConfection Aha Your solution for line 9-11 is quite simple and a direct solution for my buggy lerp event. Thanks for sharing!

Never thought it could be as simple as this!
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Aug 25, 2014 7:26 pm

@DuckfaceNinja

I'm glad I could help someone else with one of my examples.
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Tue Aug 26, 2014 12:37 am

OddConfection wrote:@DuckfaceNinja

I'm glad I could help someone else with one of my examples.



Thanks a lot. This gives me a great example of how to work this into my project.
B
12
S
3
G
1
Posts: 35
Reputation: 838


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, mariusvm and 21 guests