![]() When we're going into the battle I use scene_switcher.change_scene("res://battlescene. ![]() If _params != null and _params.has(name): Get_tree().set_current_scene(global_data.previous_scene) 15-24-51.mp4 changescenebyPackedScene.zip Calinou added bug archived topic:core crash labels on Mar 3 Sign up for free to join this conversation on GitHub. but first you have to change the Godot binary filename to include python. Get_tree().get_root().add_child(global_data.previous_scene) Godot 4 crash cause by function changescenetopacked 74278 Closed enemy141 opened this issue on Mar 3 2 comments enemy141 commented on Mar 3. Godot and Git (part 7): Tips for merging scenes and team collaboration. Global_data.previous_scene = get_tree().get_current_scene()įunc return_to_previous_scene(params = null): Godot version v3.3. # global_data is another singleton I use for storing state and other global data I currently have a scene switching singleton called scene_switcher with the current setup extends Nodeįunc change_scene(next_scene, params = null): I would keep track of the current scene in a global variable called currentscene and try something like this: func changescene (scenepath): calldeferred ('changescenedeferred', scenepath) waits until an idle period when nodes can be removed safely func changescenedeferred (scenepath): remove current scene. Once the battle scene is completed I want to return to the previous scene we were at with everything exactly the same. I am working on a breakout game and I need to reload the scene when the ball hits a wall. Currently the battle is a separate scene and when a player walks up to an NPC we have a little transition and then leave the scene and we go to the battle scene.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |