Xor Controller: owner

owner
  • Returns the game object that owns the logic brick.

Type: 
  • KX_GameObject
Xor Controller:
  • A python controller is needed to run the python script used to access any actuators connected to a Controller
Sample Code


################  get the controller owner

# import bge module
import bge

# get the python controller
# Note: My Python controller and Xor controller are attached to same game object

python_controller = bge.logic.getCurrentController()

# get the game object that owns the controller
obj = python_controller.owner

# get the Xor Controller attached to the game object
# my Xor Controller is named Xor_1
xor_controller = obj.controllers["Xor_1"]

# get the Xor controller owner
own = xor_controller.owner