Is it possible to scroll twice in the same tick ?

0 favourites
  • 4 posts
From the Asset Store
Sheeky's Power-ups Sounds
$4.20 USD
30% off
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • Hi,

    I have a problem with the function "Scroll To Position". I'm trying to set up a split screen game with the Paster plugin. The fact is that some object (tilemaps, particles, spritefonts) are not displayed if not on screen. So I have to move these objects every tick to the player position to paste them on the canvas and move them back to their position. As an alternative I tried to just move the viewport to player position, to make everything near him onscreen. But this didn't work as expected.

    So every tick I scroll the viewport to the player position. If there's one player, it works well. But with two players and two canvas I have to scroll the viewport twice in the same tick. The view port seems to be stuck in the last scroll position as the special objects that require to be on screen are not displayed if player 2 if too far from player 1.

    I made a little project for example. You can seen that the tilemap is not always paste onto the first screen (player1) unless player 2 is close to player 1.

    https://www.dropbox.com/s/jrmxp8yim7h7rpn/splitscreenScroll.capx?dl=0

    So is it possible to scroll twice in the same tick ? Or is there something to do to achieve this ? Cause I find moving all objects to fixed viewport and moving them back sometimes hard to implement with big project and moving the viewport would be more simple.

  • I'm also having the same problem.

    Ashley Tilemap setting to draw tilemap outside of viewport?

  • It's more of something that should change with the paster plugin. I'm on a mobile right now so I won't be able to find the link, but a search for paster and tilemap should yield a solution.

    Basically to paste a tilemap you move the part you want to paste into the scroll area along with the paster object, then paste it, and move everything back.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I managed to correctly draw the Tilemap with your tip R0J0hound. It works pretty well and allows the rest of a game development. The probleme is mainly with Particles and Spritefonts that are a little bit harder to move, paste and move back. That's why I wanted to simply move the viewport, but it doesn't work well.

    What's exactly the problem with the project I attached ? Why the viewport get stuck in the last moved position ?

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