object
object
gets/sets the name of the parent.
get Type: string (object name without OB in
front of it.)
set Type: string (object name without OB in
front of it.)
or
KX_GameObject
Sample
Code
################## Get object
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named act
act = controller.actuators["act"]
# get parent
parent = act.object
################## Set object
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named act
act = controller.actuators["act"]
# set OBCube as parent
act.object = "Cube"
|