Hey guys, didn't really know where to ask this so I went for General. :0
My situation:
To paint a picture - when you first start a new project in Gotdot and create your first Scene ( this I will call my Main.scene ), I want to use my Main.scene to handle all map/level changing and loading. Main.scene will contain all my logic code for the entire game. I want to load in and out pre-created map.tscn's and I also want to spawn mobs.tscn all from the main logic loop. In short, Main.scene controls the entire game, logic, input, mobs, etc..etc..
My question is, is there a way to 'append' a scene to a scene? I'm not sure how I should go about loading the level scene into my Main scene without unloading my Main scene which handles all the games logic.
Should I perhaps use Autoload and control my main game logic from scripts I feed into Autoload? Just use main.tscn to determine which map to load and unload etc. etc.. If I go that way, will code loaded through Autoload have access to variables and node handles from others scenes ? In other words, can I manipulate nodes loaded from other scenes in an Autoloaded atmosphere?
Hopefully this little diagram helps get my question across.
-Game Loads
-Autoloaded scripts load
-Main.tscn loads and loads Map1 scene ( I assume Main.tscn is now unloaded ).
-Autoloaded Logic.script kicks in and handles gameplay logic, weather system, mob spawns.. etc
-Map1 scene has been completed, player won! Map1.scene unloads and Main.scene loads back up
-Main determines its time for Map2.scene, loads it and passes control to the newly loaded Map2 scene
-Autoload Logic.script kicks back in and handles game logic as it did for Map1.. etc..
-Wash and repeat.**
I'm nearing a crucial turn in my project and I got to get my foundation down before I go much further. Oh, and I've been Up All Night ! :)
Thank you !