Limit scrollto based on player position on-screen

Get help using Construct 2

Post » Sun Nov 16, 2014 2:35 pm

Message: Huzairi G can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello construct 2 forums, thanks for the great tool, I like it more compared to the old construct classic. I have a problem to ask.

I'm trying to do this but to no avail:


I have a window sized 1024, 576 for my game. I am implementing Zone Based camera movement based on this tutorial.]

When player position is inside the inactive area, camera won't follow him. When player position is outside of the inactive area, camera will follow him. The zones will limit how far the camera would go.

Last I checked, there's no expression to return the current position of player relative to the game window position. Any workaround on this?

Try the capx, it kinds of inducing a motion sickness where the camera will always follow the user whenever he jumps even though his position when jumping hasn't reached the threshold yet.

So...yeah. Please help me senpai and sensei of construct 2 codings -_-"
You do not have the required permissions to view the files attached to this post.
Posts: 7
Reputation: 617

Post » Sun Nov 16, 2014 7:33 pm

I whipped up a quick example showing how to achieve this type of scrolling. It's implemented in a generic manner to make it easy to change how much padding you want on any of the four sides of the character.


EDIT: Note that this only shows how to do active area scrolling - there may be additional work required to get this playing well with zone scrolling.
You do not have the required permissions to view the files attached to this post.
Posts: 1,586
Reputation: 19,161

Return to How do I....?

Who is online

Users browsing this forum: A01214706 and 2 guests