creating objects


(corban) #1

hi there,

is there a way to instanciate logic brick objects from a python controller like

a = MotionActuator
a.setDLoc(0.0,0.0,1.0,1)

i know the type names of the logic bricks (like “SCA_PropertySensor”) but i cannot find a way to instanciate new objects.

thx in advance, corban


(chrisjengle) #2

I don’t know if this helps any( I haven’t actually done any python in blender yet but I’m just about to finish learning python to apply it to blender), but I would try creating another controller and actuatuator that would run only when you wanted to create that actuator ( in your previous python controller) maybe by use of a property communication actuator, or maybe scripts in the same (blender)object have access to all in formation in that object, I don’t really know what I’m talking about, I just saw that you had no replies and I thought I’d give it a shot.