I opened a property type actuator in Copy mode and took an object from another scene.
But nothing happened.
And the two scenes were in use at the same time.
I’m in UPBGE 0.2.4
I opened a property type actuator in Copy mode and took an object from another scene.
But nothing happened.
And the two scenes were in use at the same time.
I’m in UPBGE 0.2.4
I guess that does not work. As far as i know, only Messages and Python can transport Data over the Scene Border.
For the Actuator, instead you can use a simple Python Line like this:
if Scenename in bge.logic.getSceneList():
Sce = bge.logic.getSceneList()[Scenename]
Own["CopyProp"] = Sce.objects[Objectname][Propertyname]
The new Scene first exists 1 Logic Tick after it is added. So, you have to check this first to prevent an Error Message.
Can you send a .blend file?
That shows only one Solution. There are many. You have to adjust the blend for your needs. I used Messages to make sure the Scene 2 really exists. Maybe in your Case this is not necessary.
import bge
Cont = bge.logic.getCurrentController()
Sens = Cont.sensors[0]
if Sens.positive:
Own = Cont.owner
Sce = bge.logic.getSceneList()["Scene2"]
Obj = Sce.objects["Sphere"]
Own["MyProp"] = Obj["prop"]
Data over Scene.blend (552.0 KB)
It is also possible to carry Information within the Message. You have to see whats the best Solution for You.
thank you very much