How do I fade in Tiled Background

Get help using Construct 2

Post » Sun Aug 02, 2015 12:21 pm

Hello! Let's make this super quick!

A player is in a world where the background is green.
Suddenly, whoa! Look at that! There's a cave up ahead!
Naturally, you walk into the cave.

..The background is still green. This doesn't really feel like a cave...

How do I make it so the background FADES into a new cave-like background upon entering the cave?
I'm sure there's many ways to go about this, and I have a few ideas, but doesn't anyone else know of some simple ideas that I may not have thought of?

Thanks in advance!
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sun Aug 02, 2015 12:35 pm

Either create a new tiled background in front of the old and have it fade in, or create a new tiled background behind the old one and have the old one fade out?

This could be done with the fade behaviour or by changing the opacity over time..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Aug 02, 2015 12:56 pm

B
15
S
6
Posts: 105
Reputation: 1,356

Post » Mon Aug 03, 2015 1:31 am

How do I make it so that instead of pushing in and out, it happens when the character reaches a certain point in the map?

I have it where if the character is overlapping a box, the cavern will fade in, but when he leaves the box, it just flashes and goes back to the grassy background. It won't fade in both ways.. :/
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Tue Aug 04, 2015 1:36 am

Bump!
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Tue Aug 04, 2015 2:04 am

One easy way would be to check the player's x position. For example: If player.x > 1000 player.x < 2000, with these two conditions, it will only trigger if the player is within 1001 to 1999.

The easiest would actually be to use your cave tilemap as a collision detection. So if player is overlapping that tilemap, make sure to trigger once, set your fade. Than remember to do an invert as well to make sure it will revert back if it is no more overlapping, which means it is outside already.
B
45
S
22
G
31
Posts: 685
Reputation: 20,496

Post » Tue Aug 04, 2015 2:22 am

B
15
S
6
Posts: 105
Reputation: 1,356

Post » Wed Aug 05, 2015 1:39 am

Thanks! Works like a charm. Just wondering, how can I do more than two backgrounds? Like for example... Oh boy. 8!

Do I just fade out every other background besides the one I want triggered, or do I fade the last background that was viewable?
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Wed Aug 05, 2015 1:59 am

You could put all the tilemaps in and set them on default to invisible. Than using the events and actions, turn which ones you need visible.
B
45
S
22
G
31
Posts: 685
Reputation: 20,496

Post » Wed Aug 05, 2015 2:42 am

Only problem is, I haven't exactly been given an explanation of this event lol, it's just been handed to me :P

I don't exactly have time to figure it out myself either x.x Please help me out a bit ^-^
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Next

Return to How do I....?

Who is online

Users browsing this forum: Nicolas951, Shenkai the ssj, Yahoo [Bot] and 24 guests