Hello, I have a HUD (overlay scene called FPS_HUD) on my FPS game, and am trying to edit game text on my FPS_HUD from the PLAY scene.
I am having trouble connecting to the FPS_HUD scene from the play scene:
I have on my camera an Always -> Python (HUD.py) -> scene (Add overlay scene FPS_HUD)
from bge import logic as GameLogiccont = GameLogic.getCurrentController() HUD = cont.actuators["HUD_Sc"] #Getting the overlay scene actuator cont.activate(HUD) #activating it #HUD IS RUNNING NOW, shows up in scene GameScene = GameLogic.getCurrentScene() #getting our Gameplay scene HUDScene = HUD.scene #getting our HUD scene name (DOESN"T WORK) scenes = GameLogic.getSceneList() for i in scenes: print(i) #ONLY prints the Play scene, not my FPS_HUD scene! #Ammo.Clip.Text = HUDScene.objects["Ammo.Clip.Text"] #ERROR.. apparently just stored as string... #Ammo.Clip.Text = FPS_HUD.objects["Ammo.Clip.Text"] #Error, FPS_HUD not defined bodybox = GameScene.objects["Body.Box"] #This one works though