How do I change backgrounds

Get help using Construct 2

Post » Wed Jul 20, 2016 8:18 am

Message: Ramees can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
i have 5 backgrounds i want to change one after other every 1min on same layout..
plz help


https://www.mediafire.com/?vu3uu2ss33h35a4
B
7
Posts: 7
Reputation: 291

Post » Sat Jul 23, 2016 3:34 pm

Put all of the backgrounds on different frames of a sprite, then just use Sprite.SetFrame(random(Sprite.AnimationFrameCount))
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Wed Jul 27, 2016 4:57 pm

Hi gumshoe2029 thanks for helping


id like to know is it possible use changing backgrounds using tiled background?
B
7
Posts: 7
Reputation: 291

Post » Wed Jul 27, 2016 5:33 pm

Is there any reason you can't just change the visibilities?

-Set new tiled background to bottom of Z order
-set new tiled background visible
-set old tiled background to invisible

Or you can start a loop to subtract 1 from old background opacity until 0 then set invisible.

If the background consists more than just a tiled background you can setup different background layers and set the whole layer invisible.
ImageImageImage
B
40
S
23
G
11
Posts: 500
Reputation: 10,066

Post » Wed Jul 27, 2016 5:39 pm

can u make a capx for it plz
B
7
Posts: 7
Reputation: 291

Post » Wed Jul 27, 2016 5:45 pm

I think it is pretty simple, it is only changing the visibility. You should give it a try and ask for help when needed
ImageImageImage
B
40
S
23
G
11
Posts: 500
Reputation: 10,066

Post » Wed Jul 27, 2016 6:26 pm

how to make it random
B
7
Posts: 7
Reputation: 291

Post » Wed Jul 27, 2016 7:05 pm

Didn't know you wanted it random. Look-up Random() and Choose() in the handbook.

You can have it pick a random number and store it in a variable. Then just use comparison events to choose the background. Probably a different way to do it that cuts down on events but I would start with that.
ImageImageImage
B
40
S
23
G
11
Posts: 500
Reputation: 10,066

Post » Wed Jul 27, 2016 9:48 pm

why not do every 3 sec Choose a number on a variable and then what ever number assign the art asset to it
B
52
S
24
G
6
Posts: 391
Reputation: 7,845


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests