Camera: Automatic Vertical Scroll

0 favourites
  • 4 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hello Scirra Community!

    I know there are several tutorials related to the following question, but I just can't find the exact tutorial/forum thread.

    How can I make a camera to scroll vertically down, so if it hits the player, the player gets destroyed? The camera must have a movement on its own, and not dependent on a character with "scroll to".

    Here's an example from the Second Level of Battletoads:

    Subscribe to Construct videos now

    (I don't want the camera to stop).

    I'll appreciate your answers!

  • The best way that I could think of to accomplish that effect would be to create an invisible sprite with the scroll to behavior, and then have that move on every tick. Then I would check if the player is on-screen each time a movement is made, and if they aren't, then destroy them.

    Hope that helps!

  • Rabidsheep's solution is one option. I'll give you another. I'm not at my main PC at the moment, so my apologies if the terminology isn't correct, but did you try something like:

    Every tick: Scroll to Y (Scrolly+60*dt)

    If Hero is not on screen: Destroy Hero

    You can change the "60" to scroll faster or slower.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Excellent! I'm implementing it to see what happens!

    Thanks rabidsheep and zatyka!

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