How do I swap out TiledBackground image

  • what's the best way to change a rather large tiledBackground (10,000x10,000) image in the game depending on the level.

    So level 1 will have one repeating background image, and level 2 will have a different one etc...

    I could just make multiple objects, but it seems like I should be able to swap out the image tile to the one object. Has anyone done this?

    I am using parallax.

    thanks in advance..

  • I don't think you can - I suggest you just have several tiled backgrounds all set at (-10,-10) with a size set to (1,1) then just resize the required background up to what you want as required (and also resize the no longer background back to (1,1)

  • you can add them to your project files, and load them using "load from url" action. https://www.scirra.com/tutorials/328/us ... onstruct-2

  • megatronx I looked at load from url, but it wants a web address.. how do you load a local file? like for previewing or on dropbox?

    RamPackWobble yeah this is what I was going to do, or since I have an unbound layout I would just make the no longer bkgrd invisible. I have 5 different background, was just look for an efficient way to do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • megatronx I looked at load from url, but it wants a web address.. how do you load a local file? like for previewing or on dropbox?

    RamPackWobble yeah this is what I was going to do, or since I have an unbound layout I would just make the no longer bkgrd invisible. I have 5 different background, was just look for an efficient way to do it.

    You didn't read the tutorial, did you?

  • Thanks - I forgot all about "load from url".

  • megatronx nope, just looked at the manual.. didn't realize your link was to a tut.. thanks!

    For anyone that needs to know...

    Select Projects Bar, right-click "File" then Import files and select your images you want to use

    then reference those filenames where the URL would go..

    ACTION:

    BackgroundTile -> LoadImageFromURL ( choose("image1.png", "image2.png")

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