Wrapping the background without level actually scrolling

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • My game has the player object not actually move on a static frame that does not scroll. Pressing the directional keys shifts the positions of enemies, not the player.

    My understanding is that the layer toolbar allows you to make it so background object be made to wrap around as you scroll through a level, and through use of multiple layers and scrolling coefficients induce a Parallax Scrolling effect. Is there a way to compel those effects in a static frame that is not actually scrolling?

    I was able to implement such an effect another way, but through the means of having 9 background objects arranged in a 3x3 grid centered on the frame, with them moving like the enemies but having a column or row get 'flipped'. However that is both complicated and seems to occasionally glitch. I think I might be able to fix that by having a single gigantic background object with a repeating pattern that 'recenters', but even then it feels like it'd be simpler if I could just use the game's native 'wrap the background around' functions rather than weird work arounds.

  • My game has the player object not actually move on a static frame that does not scroll. Pressing the directional keys shifts the positions of enemies, not the player.

    My understanding is that the layer toolbar allows you to make it so background object be made to wrap around as you scroll through a level, and through use of multiple layers and scrolling coefficients induce a Parallax Scrolling effect. Is there a way to compel those effects in a static frame that is not actually scrolling?

    You'll need to use the Layer Object extension, but yes this is possible.

    Then once you've imported the Layer Object, you'll need move the layer manually in the given direction using an event like..

    + Repeat while “Right Arrow“ is pressed

    - Set X layer 1 to lyrGetLayerXPos( “(Layer Object)“, 1) - 1

    The above event would move layer 1, 1 pixel to the left every tick for as long as the right arrow is held. Adjust as needed for the other directions.

    To find the function to set the Layer position in the Layer Object, right click >>> Layers >>> by name/index >>> Position >>> Set X/Y position.

    To find the expression that retrieves the current layers position, right click >>> Layers >>> by name/index >>> Get Layer X/Y Position

  • + Repeat while “Right Arrow“ is pressed

    - Set X layer 1 to lyrGetLayerXPos( “(Layer Object)“, 1) - 1

    Thanks that works! Needed to make sure that the parallax moving objects were actually backdrops and not actives anymore as well as ensure layer was set to wrap, but once I did all of that it worked.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!