How do I create an horizontal camera scroll

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hello:

    I've been working on a videogame platform, controllers are fine at the moment. However there's a problem i've been trying to solve since last week. My main character has an autoscroll that follows him along the stage, however there are two times when the camera begins sidescrolling on it's own without letting the player return from whence it came, and after a short time, the autoscroll continues as always. If anyone knows the right way to find a tutorial for this, I'd appreciate it.

    Thanks in advance.

    YouTube Reference is Megaman 4 Dr. Cossack Stage 3 (from 0:17):

    /watch?v=tplNELIi7J4&t=88s

    My capx:

    drive.google.com/drive/folders/1jqzAFQddiXn5WSfzQ_frJPVHPQlN5BQo

  • YouTube Reference is Megaman 4 Dr. Cossack Stage 3 (from 0:17):

    /watch?v=tplNELIi7J4&t=88s

    Not sure if that is exactly what you want for your game camera to do.

    Didn't tried your capx, and would'v been pointless to.

    If you want that you need a continuously moving camera. (to move the camera left or right depending on the stage progress End target line... u just set scroll position X to scrollx+1 or -1 on a everytick condition)

    If you don't want that, and you only want the camera to follow the player when the player is near the edge of the camera/visible screen then try this capx.

    Edited: to be more clear, if you want the movement from the 0:17 seconds, at start camera doesnt move but then the player moves past the middle screen and camera starts rolling to right, to do that you create a variable that will act as a trigger, and say something along the lines

    if character X >= 400 lets say is the middle of screen, set variable trigger to 1

    if trigger =1 (system expression) scroll to X position ... scrollx+5

    I updated the capx above is written in C3 now even though is a capx files, try open it with C3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply, what i'm trying to make is a camera that begins moving at slow speed without following the player movement and that also won't let the player go offscreen, this function gets activated once the main character walks to an specific position (like an event trigger), and once it reaches the other side of the stage, the function cease to continue, returning to the classic "ScrollTo" behavior.

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