[Closed] Help with simple limking script
I am a scripting newbie but I love scripting stuff
Here is a a script that will take omni lights
and move them to the position of the point hepler
and then link them to the point helper with the point helper
as the parent and the omni lights as children
problem is i can’t get the link part to work
searched the maxscript help but could not find
here is my listener script so far
foo=$point* as array
doo=$omni* as array
for i in 1 to foo.count do
doo[i].pos=foo[i].pos
doo[i].parent =foo[i]–this line is bad
i am probably one word off success but i need a little guidance!
Try it like this:
foo=$point* as array
doo=$omni* as array
for i in 1 to foo.count do (
doo[i].pos=foo[i].pos
doo[i].parent =foo[i]
)
(I added () to the for-loop)
Without parenthesis only the next line is part of the loop (in your case only “doo[i].pos=foo[i].pos”). Then you get then an error because max doesn’t know what the “i” in “doo[i].parent =foo[i]” is.
Hope that helps.