object
object
gets/sets the name of the game object to be added.
Type: string
Note:
Returns None if there isn't
a game object to be added
Note:
Set object, use name
without OB in front
In other words: use "Cube" and not "OBCube"
Sample
Code
################## Get object
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named Spawn
spawn = controller.actuators["Spawn"]
# get name of game obect
name = spawn.object
################## Set object
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named Spawn
spawn = controller.actuators["Spawn"]
# set name of game obect
spawn.object = "Cube"
|