How do I land on a planet

0 favourites
  • 5 posts
From the Asset Store
Learn lowercase and uppercase letters in English.
  • Hi folks, I'm doing a testing platformer for learning purpose.

    The space ship is moving down (from top to down)while the infinite background is running under it on the Y axis. This effects is giving the feel of the SpaceShip moving forward but not Up but down.

    Most of the platformers have the space ship on the bottom and the background moves from top to bottom. In my case it's the opposite.

    After destroying 10 asteroids I want the ground to appear and this is I have no idea how to do.

    What I have is an infinite background moving on the Y axis giving the illusion of the infinite background. How can I smoothly integrate the entry of the "earth ground"?

    I thought about something like:

    Create a Variable for keeping track of how many asteroids we kill.

    When we kill 10 of them (system compare variable), something happens.

    I thought about stopping the move of the background resetting it's Y axis to 0 but this stops it suddenly resetting the position and it's not smooth.

    Than I thought to put the ground on the scene and make it not visible at the beginning. When the variable teaches 10, it will be visible...but as before, it's not smooth.

    Id like to stop smoothly the moving infinite background as the space ship would decrease it's speed and make the Ground appear as it's entering the scene from below.

    Hope it can make sense to you and someone could point me in the right direction.

    Thanks.

  • Ok, I managed to make it work. Some trial and error but if works. Here is how it looks.

    Edit: yeah I thought it would work but it's not in every case...I leave it here for any reference.

  • If it works sometimes I would guess you are missing the passLevel on the times it is not working. Since it is exactly 10 and only so many checks can be done it is potentially possible to get to 11 and break the trigger.

    try setting passLevel >= 10

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great tip! Thanks bro!

  • Awesome it worked! Now I have just to understand how to animate In the ground sprite which should enter as the Bg is stopping it's animation. Any advice? Thanks!!!

    Edit: I solved it. It's the Move to event but unchecking the Set Angle option.

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