Module KX_SceneActuator :: Class KX_SceneActuator

Class KX_SceneActuator

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
        SCA_IActuator.SCA_IActuator --+
                                      |
                                     KX_SceneActuator

Scene Actuator logic brick.


Warning:

Scene actuators that use a scene name will be ignored if at game start, the named scene doesn't exist or is empty

This will generate a warning in the console:

ERROR: GameObject OBName has a SceneActuator ActuatorName (SetScene) without scene

Instance Methods
 
setUseRestart(flag)
Set flag to True to restart the scene.
source code
 
setScene(scene)
Sets the name of the scene to change to/overlay/underlay/remove/suspend/resume.
source code
 
setCamera(camera)
Sets the camera to change to.
source code
boolean
getUseRestart()
Returns True if the scene will be restarted.
source code
string
getScene()
Returns the name of the scene to change to/overlay/underlay/remove/suspend/resume.
source code
string
getCamera()
Returns the name of the camera to change to.
source code

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details

setUseRestart(flag)

source code 
Set flag to True to restart the scene.

setScene(scene)

source code 
Sets the name of the scene to change to/overlay/underlay/remove/suspend/resume.

setCamera(camera)

source code 

Sets the camera to change to.

Camera can be either a KX_Camera or the name of the camera.

getScene()

source code 

Returns the name of the scene to change to/overlay/underlay/remove/suspend/resume.

Returns an empty string ("") if no scene has been set.
Returns: string