+1 vote

Hi everyone! I have a problem with Godot that I don’t know how to solve: I have a main node whose child nodes are three different scenes. When I start the game, the three scenes take place simultaneously, overlapping each other.
What I want, however, is that the three scenes happen separately, and in chronological order (specifically, an animated intro, a main menu, and the first level of the game).

How can I do it? Thank you!

asked Dec 17, 2018 in Engine by Rob1980 (70 points)

1 Answer

+2 votes
Best answer

If i understood you correctly, you need to use different scenes for each (one for intro, one for menu, and one ofr level one). Do not instance all three scenes into a main scene. Just the one you want to be loaded at start. Then, you can change scenes when animation ends, or a button is pressed, with something like this:

get_tree().change_scene("res://path/to/scene.tscn")

For example, in your main scene, you only instance the intro scene. When intro finish, change scene to menu. And when player press start (for example) in the menu, change to level 1. Do i explain myself?

answered Dec 17, 2018 by p7f (2,666 points)
selected Dec 18, 2018 by Rob1980

It works! Thank you so much! ;-)
Another question: when I’ll export the project, will the scene order remain the same? Will not I have to insert them all in one main scene?

Hi,
The exported project should work the same as the project inside godot.

Thanks again! ;-)

You are welcome!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.