Load a scene and access objects immediately

Hi guys, loving you is like loving the dead, let me proclaim my question, then.

Init code in a scene I have attached to an empty, see:

def loadscene():
    logic.addScene("skybox", 0)
    logic.addScene("overlay", 1)

A background, and a hud, no mud.

I’d like to access objects in the “overlay” scene, but at that point it is not yet loaded because the Game logic has not yet loaded the scene I instructed it to load at that point. That thing of ticks and stuff. Point taken, not mistaken.

Is there any other code way of doing it without ticking true level pulse mode in the sensor? Something simple to make the “overlay_text()” function happen in the second tick? It’s just a counter updated when the player makes some stuff, and there’s no need to constantly instruct the system to update the thing. I can make it update on-demand, but not make it present itself correctly in the beginning, my head is ticking.

Mucho helado de limón pra vosotros, amigos.

A little poet?

The answer is: no

All you do is - you tell the system you want this scenes loaded. The system will load them when it is read to do this. The control is to the system. It will load and process the scenes at the rigth time, that it does make the game instable.

See it as scene actuator. You activated it. Now you wait that it runs.

So I suppose I should do this the other way around, and change the text through the overlay scene, and not the “level” one. Ok.
Thanks, my good man.

You can put 2 state scenes in the main one. In the first state a python code (conected to a always) asking if the HUD scene is on the fly (if len(scenes)>1 then change to state 2, where state 2 is your previous logic design)

P.D. No me gusta el limón y mucho menos en helado :wink: