Libload in libLoad-ed Scene?

Hi,
I load from an load_screen.blend the main program (hill_landscape.blend) and want to load in this main program an HUD scene in overlay mode from another file, like hud.blend

I load the main with this code:


import bge

def load_process(cont):
    own = cont.owner
    global status
    bge.logic.addScene('load_scene', 1)
    level_file = str("//" + str(own["level"]) + "_" + str(own["typ"]) + ".blend")
    try:
        status = bge.logic.LibLoad(level_file, 'Scene', load_actions = True, load_scripts = True, async = True)
    except:
        print('this_level_does_not_exist')
        bge.logic.sendMessage('fail1')
    status.onFinish = finish_load

def finish_load(status):
    load_scene = [s for s in bge.logic.getSceneList() if s.name == 'load_scene'][0]
    load_scene.end()

    #Set scene camera
    level_ss = [s for s in bge.logic.getSceneList() if s.name == 'game_level'][0]
    level_ss.active_camera = level_ss.cameras["Play_Cam"]
    print(level_ss.active_camera)

if someone needs the blend file: (only the load screen)
load_screen.blend (694 KB)

thanks

What is your question?

it didn’t work for me to load an scene in an loaded scene

have the error that the scene is existing but don’t figured out why.

later will give more infos

As far as I remember Libload “Scene” merges the data from the .blend file into the current scene.

It does not add a new scene to memory.