Limit scrollto based on player position on-screen

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • 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 scirra.com/tutorials/747/zone-based-camera-movement 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 -_-"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

    [attachment=0:1u81g0w6][/attachment:1u81g0w6]

    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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)