#get the actuators (from camera)
self.HUD = cont.actuators["hud"]
cont.activate(self.HUD)
At same time i use the HUD scene as the prime storage for ObjectsPrototypes.
Planing on create objects in realtime in the main scene based on their Prototypes.
The API states that Overlay scenes can be accessed…API
This command however just returns me a list with only the main scene.
I have also a crosshair in the Overlay scene that shows like it should.
Sum:
I can see the Overlay scene called HUD
but i can not get its reference.
How should i go about thi, to get the reference to it?
Normally scenes are accessible through. sce= bge.logic.getSceneList(); the main scene in you case will be sce[0] and the overlay sce[1]
objects in the overlay scene can be found at sce[1].objects.
You don’t need to access the actuator that adds the scene!
I just finished with some tests.
The only misstake i have been doing is to try to get it on the first tick.
After the first tick its no problem to get it.
@torakunsama
I just use this way to to send an activtion impulse to the actuator.
anyway Thanks
Edit: i have been too fast.
from bge import logic
allScenes = logic.getSceneList()
own = logic.getCurrentController().owner
mainS = allScenes[0]
hudS = allScenes[1]
OoS = hudS.objects["Orb of Stone"]
mainS.addObject(OoS,own,0)
This does not work, why?
It creates the Object in the hudS, while i clearly ordered it to create it in the mainS…
If the object orb of stone exists on the main scene, you don’t need to add it to a variable, just summon it directly:
main.addObject(‘orb of stone’, own).
Besides, the object is presumed being in a hidden layer, so you are asking for an object that is on active layer in another scene.