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

Class KX_SceneActuator

source code

PyObjectPlus --+            
               |            
          CValue --+        
                   |        
     SCA_ILogicBrick --+    
                       |    
           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]
    Deprecated
 
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
integer
getExecutePriority()
Gets the execution priority of this logic brick.
source code
KX_GameObject
getOwner()
Gets the game object associated with this logic brick.
source code
 
setExecutePriority(priority)
Sets the priority of this logic brick.
source code
    Inherited from CValue
string
getName()
Returns the name of the CValue.
source code
    Inherited from PyObjectPlus
bool
isA(game_type)
Check if this is a type or a subtype game_type.
source code
Instance Variables [hide private]
KX_Camera on read, string or KX_Camera on write camera
the camera to change to.
int from 0 to 5 GameLogic.Scene Actuator mode
The mode of the actuator
string. scene
the name of the scene to change to/overlay/underlay/remove/suspend/resume
bool useRestart
Set flag to True to restart the sene
    Inherited from SCA_ILogicBrick
int executePriority
This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
string name
The name of this CValue derived object (read-only).
KX_GameObject or None in exceptional cases. owner
The game object this logic brick is attached to (read-only).
    Inherited from PyObjectPlus
bool invalid
Test if the object has been freed by the game engine and is no longer valid.
Method Details [hide private]

setUseRestart(flag)

source code 
Set flag to True to restart the scene.

Deprecated: Use the useRestart attribute instead.

setScene(scene)

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

Deprecated: use the scene attribute instead.

setCamera(camera)

source code 

Sets the camera to change to.

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

Deprecated: use the camera attribute instead.

getUseRestart()

source code 
Returns True if the scene will be restarted.
Returns: boolean

Deprecated: use the useRestart attribute instead.

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

Deprecated: use the scene attribute instead.

getCamera()

source code 
Returns the name of the camera to change to.
Returns: string

Deprecated: use the camera attribute instead.


Instance Variable Details [hide private]

camera

the camera to change to. When setting the attribute, you can use either a KX_Camera or the name of the camera.
Type:
KX_Camera on read, string or KX_Camera on write