How do I fade in\out of a layer or layout?

Get help using Construct 2

Post » Thu Jun 04, 2015 10:10 am

@mrlight234

I tried that, but it seems that it does not work, I just don't have clue about what I did wrong:

Image
B
11
S
1
Posts: 63
Reputation: 658

Post » Thu Jun 04, 2015 10:25 am

Menu_small.Opacity will give you the value of the current opacity of the object Menu_small..
Adding a dot behind it does nothing..

I guess what you are trying to do is

every tick set menu_small opacity to: lerp(Menu_small.opacity,100,0.2)

so the first value is the current opacity, the second value is the number you want to get to and 0.2 is the amount it will shift between the two..

This works because every tick the current opacity is changed to a number closer to 100..

so tick 1 Menu_small.opacity = 0
lerp(Menu_small.opacity,100,0.2) value is 0+(100-0)*0.2= 20

so tick 2 Menu_small.opacity = 20
lerp(Menu_small.opacity,100,0.2) value is 20+(100-20)*0.2= 36

so tick 3 Menu_small.opacity = 36
lerp(Menu_small.opacity,100,0.2) value is 36+(100-36)*0.2= 48.8

so tick 4 Menu_small.opacity = 48.8
lerp(Menu_small.opacity,100,0.2) value is 48.8+(100-48,8)*0.2= 59.04

etcetera..
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 » Thu Jun 04, 2015 6:28 pm

LittleStain, thank you. You made me understand. :)
B
11
S
1
Posts: 63
Reputation: 658

Previous

Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi and 18 guests