Module KX_SceneActuator :: Class KX_SceneActuator
[hide private]
[frames] | no frames]

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 [hide private]
 
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 [hide private]

setUseRestart(flag)

source code 

Set flag to True to restart the scene.

Parameters:
  • flag (boolean)

setScene(scene)

source code 

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

Parameters:
  • scene (string)

setCamera(camera)

source code 

Sets the camera to change to.

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

Parameters:

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