How do I make tiled background image change

0 favourites
  • 15 posts
From the Asset Store
40 ambient sound loops. A wide selection of looping ambient sounds for different locations.
  • im making an auto runner with the template so far it's fine but im making it so that once you get to certain distance it change level ''the background and the platforme''

    and i want the bloc to change for each level

  • Currently the tiled background in C2 does not support animations, if it was a Sprite you would simply change its animation to change its appearance, but in your case, it is impossible.

    The solution is to use another tiled background object.

    You may have created some events to scroll your tiled background or do other stuff to it. If you add another tiled background, you either have to copy-paste all the events applied to the first one, then replace it with the new one (right-click, replace object). The best solution however would be to create a Family for all your tiled backgrounds, then have your events work with this family so you don't repeat yourself.

    Another solution, if you want to do it quickly, is to put different backgrounds on different layers and set one layer visible at a time.

  • You can also try:

    TiledBackgraund replacement should be the same size as the "originals"...

    (so if "Block" is 64x64......"Block1","Block2"............"BlockX" should be the 64x64)

    https://www.scirra.com/manual/141/files

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thx, i'll try that so we can use the load image url with sprite that are in game file? =D

  • Sorry to bump after so many years, but this load image from url looks interesting for all of the instances of a particular tiled background. Does this actually work? And could I loop through several different images for an animated tiled background effect?

  • Zebbi

    It's simple enough to test and see. Loading images is done per instance with tiledbackground instead as with per object type with sprites. To animate you probably would want to just create a bunch of instances, load a different image per one, and cycle which one is visible.

  • Zebbi

    It's simple enough to test and see. Loading images is done per instance with tiledbackground instead as with per object type with sprites. To animate you probably would want to just create a bunch of instances, load a different image per one, and cycle which one is visible.

    Yes, the problem is for designing a level, it would involve placing multiples of the same object over each other, whereas with an image, I could theoretically just store the different frames of animation and load each one of the frames sequentially to every instance of the tiled background of it's type (say, tiledbackground 7)?

  • Zebbi

    It's simple enough to test and see. Loading images is done per instance with tiledbackground instead as with per object type with sprites. To animate you probably would want to just create a bunch of instances, load a different image per one, and cycle which one is visible.

    If one were to use URL would that mean the player would have to be online for the background to load?

    So assuming a player is offline, the BG would just display the current layer background?

  • > Zebbi

    > It's simple enough to test and see. Loading images is done per instance with tiledbackground instead as with per object type with sprites. To animate you probably would want to just create a bunch of instances, load a different image per one, and cycle which one is visible.

    >

    If one were to use URL would that mean the player would have to be online for the background to load?

    So assuming a player is offline, the BG would just display the current layer background?

    I think it works locally? It's just as it uses html5, I think it uses the syntax?

  • R0J0hound Just before I do this myself, would this actually change every instance with a new image or does it work on a per instance basis?

  • Yea it works great, I threw the tile references into an array and rotated through it, I'll post an example later.

  • Zebbi

    You should be able to use a different image per tiledbackground instance.

  • Zebbi

    You should be able to use a different image per tiledbackground instance.

    Sorry, yeah, it works for every instance of the same tile perfectly, just need to get an example made.

  • > Zebbi

    > You should be able to use a different image per tiledbackground instance.

    >

    Sorry, yeah, it works for every instance of the same tile perfectly, just need to get an example made.

    please, could you continue your discussion in pm as i get notification each time you post on this super old forum post.

  • >

    > > Zebbi

    > > You should be able to use a different image per tiledbackground instance.

    > >

    > Sorry, yeah, it works for every instance of the same tile perfectly, just need to get an example made.

    >

    please, could you continue your discussion in pm as i get notification each time you post on this super old forum post.

    Okeeeeeee...

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