Game Object: groupObject

groupObject
  • Returns the group object

Return Type:

  • KX_GameObject
Note:
  • Game Object belongs to a group: Returns the group object
     
  • Game Object doesn't belong to a group: Returns None

 

Sample Code

################### get the group object
  

# import bge
import bge

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

# get object that controller is attached to
obj = cont.owner

# get group object
memList = obj.groupObject