How to do this?

I am trying to make a scene change button with a fade to black transition. I am using a black sprite to have the opacity increase when the button is pressed (the button is a button panel sprite). I have tried many ways and cant get the opacity to increase like in an event without a condition. Its not supposed to increase the opacity WHILE the button is being pressed its supposed to increase forever AFTER its been pressed.

Hi!

The code below is the way I have made fade out / fade in transitions. “FadeOutBox” is a black sprite, having Tween behaviour. Tween is the easiest way to make the transition.

Hopefully this helps. :slight_smile:

Thanks! It worked. Now I also know how to use Tween.

Great to hear that! Yes indeed, Tween is fantastic feature, which enables you to make so many things easily.

I recommend to check the Youtube tutorials about Tween. They might be very eye-opening. This is “official” one, but there are many others, too:

Attention! One critical parameter of Tween has changed since all the tutorial videos have been made. Previously tween time was given in milliseconds, but about a month ago it has been changed and now the time is given in seconds.

1 Like