0
$\begingroup$

I mean without controller being connected to Edit Object > Add Object Brick. Furthermore, I need to add that object at a specific location, instead of putting it on top of the owner, since I will be adding more than one object so they can't be all at one location. I tried moving the owner but it cannot move and create objects more than once in a single frame for some reason, probably because it takes a frame to pass for a controller to reach a signal towards an actuator Brick. So I figured doing it from a controller might be a solution but I don't know how to do that.

$\endgroup$

1 Answer 1

0
$\begingroup$

How to add an object at a specific posistion in Blender Game Engine

import bge

scene = bge.logic.getCurrentScene()
object = scene.addObject("Sphere","Sphere")
object.worldPosition = [1,1,1]
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .