transitions within a layout

For questions about using Classic.

Post » Tue Dec 22, 2009 1:22 am

How would I make a simple transition that makes the screen fade to black for a few while and then fades in again within a layout?

I would be using this in a way to remove objects in front of the player without him saying "WTF?! objects suddenly dissappeared like bugs bunny!". So what I would like to do is fade the screen to black for a while and in that time duration, the game would destroy some objects, then fade in again, and so on. HEYLP! Whats up doc?
B
10
S
5
G
8
Posts: 203
Reputation: 4,395

Post » Tue Dec 22, 2009 1:27 am

Create a layer as your topmost layer, place a full screen tiled background in black on it, and then fade that layer in and out whenever you need it.

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Tue Dec 22, 2009 1:42 am

Or using Krush' suggestion, but a mosaic effect instead, gradually growing larger and larger then back again. I dunno, it's a fun effect, very retro :)
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Tue Dec 22, 2009 1:54 am

[quote="KrushBrother":2o3tdbip]Create a layer as your topmost layer, place a full screen tiled background in black on it, and then fade that layer in and out whenever you need it.

Krush.[/quote:2o3tdbip]

That's exactly how I do it. Even if I'm actually changing to another layout, I still manually make my own fader object on the top layer. I guess it just feels like I have more control over how it works that way.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Dec 22, 2009 5:22 am

The gradient object has all that built in, fade to transparent, fade to another color, bla, bla, bla.
Heck if we had a radial gradient you could even do a Warner Bros. title screen.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Feb 03, 2010 5:22 am

[quote="KrushBrother":3loiw365]Create a layer as your topmost layer, place a full screen tiled background in black on it, and then fade that layer in and out whenever you need it.

Krush.[/quote:3loiw365]

I'm sorry if this is a mega bump but, I want to know how to make that effect. I can't find the "fade" effect on layers.

Thanks.
?When everyone feels hope at the same time, wonderful things can happen.
B
5
G
3
Posts: 67
Reputation: 1,059

Post » Wed Feb 03, 2010 6:05 am

Well, I was actually able to do it, but just a simple fade in/out effect. What you need to do is simple make a black tilebackground covering the whole layout, then set its opacity to 0 by default, when give it a private variable which is also equal to 0.

Now when you need to use a fade in transition, just make an event like this (lets say the private variable of black is called opa, and the black tiled bg is called black:

If black's opacity < 100
--> Every 1000 millisecond
--> opa = opa + 1
--> black's opacity = opa

Yeah, something like that. Just do the opposite for the fade out thing.
B
10
S
5
G
8
Posts: 203
Reputation: 4,395


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests