How do I swap out TiledBackground image

Get help using Construct 2

Post » Sat Apr 19, 2014 4:38 am

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..
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Sat Apr 19, 2014 7:56 am

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)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sat Apr 19, 2014 10:12 am

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
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Sun Apr 20, 2014 5:46 pm

@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.
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Sun Apr 20, 2014 6:28 pm

jobel wrote:@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?
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Sun Apr 20, 2014 6:55 pm

:oops:

Thanks @megatronix - I forgot all about "load from url".
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Mon Apr 21, 2014 4:44 pm

@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")
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests