questions with "Scroll To"

0 favourites
  • 5 posts
  • Hello all,

    I'm more of a problem, I hope you help me again =). I have a platform game, the game character's behavior is "Scroll To". I would like to stay in character when the lower deck, the "Scroll To" not be centered vertically.

    During the phase, the character is centered vertically, but when it gets too low on a platform, like the "Scroll To" did not follow my character. I would like to stay like this picture, Mario down, and only focuses on the vertical when the character goes: twscritic.files.wordpress.com/2011/06/super-mario-world-snes.jpg

    Thank you =)

  • The very same question was asked some time ago.

    I made this capx to answer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Kyatric Hello, this link helped and clarified a lot. Sorry repeat post something.

    But I found the answer to what I want is a little different from the final result.

    I want my character throughout the stage, where he is climbing the platforms, the "Scroll To" is centered on the coordinates Y

    But when my character is in the lower phase, the "Scroll To", is no longer centralized. I guess it is something like this:

    player > Scroll To

    if player.y > 1000 >> Scroll to - 100px

    Something like that, has given hope to understand.

    Thank you.

  • I got personal, I do not know if it's the best way out, but if anyone has a doubt, seeing as I did:

    <img src="http://img80.imageshack.us/img80/1097/duvidascirra.png" border="0" />

    I say if the Y position of the character is smaller than 1000px, the "Scroll To" is equal to the character. If the character is too low, ie, the Y position is smaller than 1000px, the "Scroll To" is only the position X.

    Hugs =)

  • i had the same issue, and ur solution works great. thx filippileonardo!

    btw... magi great game!

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