|
addObjectaddObject(object, other, time)Instantly adds an object to the sceneReturns the object being added Type:
KX_GameObject
Method Parameters: object:
New game object
being
added.
Type:
KX_GameObject
or string other:
Object that is
being used to add the new game object
Type:
KX_GameObject
or string time:
Lifetime (in frames)
of the object being added.
0 = forever Type:
integer
Sample Code# get controllercontroller = GameLogic.getCurrentController()# get current scenescene = GameLogic.getCurrentScene()# Add OBSuzanne at OBEmpty positionscene.addObject("Suzanne", "Empty", 0) |