Like the ‘local SourceOBJ’ - is this it telling it what to do, or a temporary name for the object which I could edit mine into? I want it to pick a source object called ‘ctv_src’ and clone/align it over all objects called ‘ctv_dest’ but none of this is making any sense and i cant even follow the names and references properly.
…Does anyone have any recommendation of a book to read too? It bothers me that I cant do this
SourceOBJ = $ctv_src
TargetOBJ = $ctv_dest*
for i in TargetOBJ do
(
Temp_SourceCopy = Copy SourceOBJ
Temp_SourceCopy.transform = i.transform
Temp_SourceCopy.parent = i
Temp_SourceCopy.name = (SourceOBJ.name)+"_"+(i.name as string)
)
You can change ‘Copy’ to ‘Instance’ if you want instances
There’s no error checking in there and it could be more effecient but that should do the trick.
As for learning this stuff, I strongly recommend Bobo’s CG Academy dvd’s (although I think I’m right in remembering that he’s had problems with them paying him or something similar…?) and a couple of talented bods have started blogs with some maxscript stuff on them which should be helpful
The maxscript help is very good for learning, there are examples to get you started and for almost all methods and interfaces.
I think the best way to learn is do what you’re doing now, start with a simple idea and develop it. You might be surprised how quickly it starts to make sense. And if you get stuck ask for help.