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:
(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.
Develop games in your browser. Powerful, performant & highly capable.
Excellent! I'm implementing it to see what happens!
Thanks rabidsheep and zatyka!