Ojah
07-04-2011, 03:18 PM
Hi,
got a small problem with scripted controllers and hoped you guys could help me :).
Im simply trying to extract the objects used in a scriptcontroller. To test this i made some simple code that creates a box with a scriptcontroller that references a created cylinder's position controller.
Now if I want to get the cylinder-object by using getTarget my print returns the controller (Controller:Position_XYZ).
code:
theBox = box name:"testbox"
theCyl = cylinder name:"testCylinder"
theBox.pos.controller[1].controller = (float_script())
ctrl = theBox.pos.controller[1].controller
ctrl.addTarget "testTarget" theCyl.pos.controller
getCyl = ctrl.getTarget 5 asObject:true
print getCyl
if anyone knows how to get the print to show the cylinder object, please let me know :)
Thanks
got a small problem with scripted controllers and hoped you guys could help me :).
Im simply trying to extract the objects used in a scriptcontroller. To test this i made some simple code that creates a box with a scriptcontroller that references a created cylinder's position controller.
Now if I want to get the cylinder-object by using getTarget my print returns the controller (Controller:Position_XYZ).
code:
theBox = box name:"testbox"
theCyl = cylinder name:"testCylinder"
theBox.pos.controller[1].controller = (float_script())
ctrl = theBox.pos.controller[1].controller
ctrl.addTarget "testTarget" theCyl.pos.controller
getCyl = ctrl.getTarget 5 asObject:true
print getCyl
if anyone knows how to get the print to show the cylinder object, please let me know :)
Thanks
