Actuator Logic Brick: owner

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

Return Type:
  • KX_GameObject
Sample Code


################  get the game object that owns the logic brick  
  
# import bge module

import bge

# get the controller
cont = bge.logic.getCurrentController()

# get the actuator attached to the controller
# my actuator is named actuator

act = cont.actuators["actuator"]

# get game object that owns actuator
obj = act.owner