How to make a simple transition scene between Levels/Worlds?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LurreAllire

Pretty simple question, and i hope its simple to answer.

I just want a little transition between my level change so it doesnt look that ugly.

:bust_in_silhouette: Reply From: supper_raptor

This is very simple transition effect

  1. Add a CanvasModulate and Tween to your level.
  2. When you are ready to change your level run this function
	func level_change_trans():
        var time = 2
        $Tween.interpolate_property($CanvasModulate,"color",
        Color(1,1,1,1),Color(0,0,0,0),time,Tween.TRANS_LINEAR,Tween.EASE_OUT)
        $Tween.start()

It just blackens the screen and its not that good but you can modify according to your needs.

So, I made what you said, attached a script to the Canvasmodule and load automatically into the scene and calling the function with my level transition one. The problem is that there is nothing. I tested if the function is being executed (via print) and it says it gets executed. Am i doing something wrong? Do i have to wait till i switch scenes?

LurreAllire | 2020-04-17 14:51

So, i disabled the transition between levels and i don’t even see a black screen.
I am working on this for 3 hours now.
This cant be that hard right?

LurreAllire | 2020-04-17 14:54

Omg it worked.
I had to to change the name of the Canvas.
thx for helping

LurreAllire | 2020-04-17 14:56