How do I manipulate the ScrollTo function

0 favourites
  • 3 posts
  • HI,

    Two questions. First, how can I stop the ScrollTo function from running. On the bottom level of a multi-leveled platform stage, I want to have the Player jump into a hole and have the ScrollTo not follow him. I think it has to do with Y and LayoutHeight, but I can't figure out which way Y runs... is it at Zero on the bottom of the layout and increasing positively upwards, or negatively? I've tried Y greater than LayoutHeight + 50 but not getting anywhere....

    Second, how do I adjust the ScrollTo function so that it does not center the Player. I'd like to show more area above the player's head permanently as they navigate through the levels. I figure this is also maybe a System adjustment.

    Any suggestion appreciated,

    thanks

    M

  • 1. You disable it with the action ScrollTo > Set Disabled when the player falls down the hole.

    2. The manual states that you can't directly adjust it. You can however create an invisible object that you ScrollTo, which I guess would act like an invisible camera. For example, if you Pin an invisible object to the player, offset from the player as much as you want the player to be off-centre, then you assign ScrollTo to that object, the invisible object will move with the player but the ScrollTo will be focused on the invisible object. Alternatively, you could also allow the invisible object to move freely if you want it to change throughout the game, if you want the player to become centred again then disable it on the invisible object, enable it on the player etc etc

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks plinkie,

    I added the invisible object and pinned it to Player, put the invisible object a little bit above my player and then added the scrollTo function to the invisible object, works like a charm. (disable collisions, kept visible, turned opacity to zero on the invisible object).

    And when they jump in the hole I made an invisible object for the player to collide with that turns off the scrollTo function on the phantom player.

    cheers,

    M

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