Edit nodes in unloaded level

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

I have a QuestManager which stores quests (and their contained objectives) like so:

  • QuestManager
  • Quest
    • Objective 1
    • Objective 2
  • Quest
    • Objective 3

Each objective has a position (vec2) and a level name (e.g. “outside”). Objectives do not appear until previous objectives have been completed.

Objective 1 is located “outside” and Objective 2 is located “inside”. When Objective 1 is completed “outside”, Objective 2 must appear (i.e. create a collectable item, etc.) “inside”.

How can I make Objective 2 appear in the “outside” level if said level is not the current level?

Notes:

  • I am currently using get_tree().change_scene(path) to switch between levels
  • I’ve also tried to use get_tree().change_scene_to(packed_scene), where
    var packed_scene = preload(path).instance(), but this gives me a blank screen when I try to change scene.

change_scene_to takes a PackedScene variant but you use an instance instead

change

var packed_scene = preload(path).instance()

to

var packed_scene = preload(path)

Wakatta | 2022-11-08 16:41