How to? Slider Effect

0 favourites
  • 3 posts
From the Asset Store
slide the tiles to fill the board.60 awesome levels.
  • Hey everyone! I have a layout with 20 levels to select from. I want to add a Left and Right arrow so that a player can view the next 20 levels. I don't want to change the Layout though. Is there a way I can have 20 sprites slide in at once? Hope I explained myself clearly.

    Here's a photo of what I mean.

    <img src="" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • not sure my solution is the best, but:

    You set your Background layer parallax to (0, 0)

    You createanother layer for your button's levels, with a parallax of (100, 0), to make this layer scroll on the X axis

    and You use the scrolling to make it scroll (a ScrollTo behaviour on a sprite maybe, and you move the sprite when necessary)

  • Theres the easy tween behaviour, or you could lerp it.

    put sprites into a family.

    if left arrow pressed and variable = stop, set family variable "target_pos" to self.x - what ever, set variable to left.

    if variable = left,

    sub event

    distance to "target_pos" > 1, set family.sprites x pos to lerp(self.x, "target_pos", dt*speed)

    distance to "target_pos" <= to 1 set variable to stop.

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