This basically is my script:
from bge import logic cont = logic.getCurrentController() own = cont.owner scenes = logic.getSceneList() for i in scenes: if i.name == "targetingscene": targsce = i else: print("the shit is not there") def trackto(): targ = targsce.objects["cursor"] to_target = targ.worldPosition - own.worldPosition world_z = Vector((0, 0, 1*-1)) crossed = world_z.cross(to_target) own.alignAxisToVect(crossed, 0)
I used to work before but it won’t this time. Am I blind? Am I not seeing anything?
The scene certainly is active and it’s given enough time to load. The script gets executed a second after adding the scene as an overlay. I even tried larger delays.
It will only tell me that the shit’s not there and that targsce has not been defined.
Do you see any reason or mistake I made?
There should definitely be a better way for getting scenes in later builds…
Thanks in advance, have a good night!