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

Class KX_SceneActuator

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

setUseRestart(flag)

 

Set flag to True to restart the scene.

Parameters:
  • flag (boolean)

Deprecated: Use the useRestart attribute instead.

setScene(scene)

 

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

Parameters:
  • scene (string)

Deprecated: use the scene attribute instead.

setCamera(camera)

 

Sets the camera to change to.

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

Parameters:

Deprecated: use the camera attribute instead.

getUseRestart()

 

Returns True if the scene will be restarted.

Returns: boolean

Deprecated: use the useRestart attribute instead.

getScene()

 

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()

 

Returns the name of the camera to change to.

Returns: string

Deprecated: use the camera attribute instead.


Instance Variable Details

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