Skip to content

Has the ‘Change Scene’ feature disappeared? #2097

Closed Answered by metanoder
PoliyasRoden asked this question in Q&A
Discussion options

You must be logged in to vote

Change Scene is deprecated.

Use Signals or autoload func call to change scene.

via Autoload

func change_scene(argument:String):
        get_tree().change_scene_to_file(argument)

Call Autoload on timeline ie...
do autoload.change_scene("res://scene_name.tscn")

Connected signal ie...
To react to the signal event, connect to it before starting your dialog:

func _ready():

     Dialogic.signal_event.connect(_on_dialogic_signal)
     Dialogic.start("My_Dialog_Timeline")

func _on_dialogic_signal(argument:String):
        get_tree().change_scene_to_file(argument)

func _on_dialogic_signal(argument:Dictionary):
    if argument is Dictionary:
        if arg["method"] == "change_scene": # checks …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PoliyasRoden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants