Layer hopping in Real Time...

Simple. The Startup Menus lead the player to a “Faction Selection” Screen. Depending on the players choice it should send them to the “Character Creation” Screen that coincides with that faction (those scenes are on separate layers in the same scene) with the following script…

import bge
import bpy
def main():
    cont = bge.logic.getCurrentController()
    own = cont.owner
    sens = cont.sensors['mySens']#sens is nothing more than a message from the select button     
    actu = cont.actuators['myAct']#actu is for property, "Selected" False to True
    if sens.positive:
        if own['Selected'] == 1:
            bpy.context.scene.layers[1] = True
            bpy.context.scene.layers[0] = False

Here’s the deal: It works…but it doesn’t update untill the game engine stops. What to do?:no:

Two things.

  1. Layer hopping can’t be done in realtime with the BGE the way it is (to my knowledge). The visible layers of the scene are the only ones that run.
  2. This method you have won’t export with a BGE runtime (you would have to run the game in a Blender executable).

:confused:Thank you (for not letting me bang my head against the console for days. Had wanted to avoid creating separate scenes for each little aspect of Character Customization but, oh well.


look for AddObject/EndObject maybe groups. That should eb usfull for character customisation.