hello !
i began learning maxscript not so long time ago … and for practice what i’ve learned so far i decided to write a script that would help me in my work (architecture visuals).
my script shoud do basicaly a hedge from a module that i allready have, the script is based on for loops copying, scaleing and rotating the module along a spline. My problem is that with basic objects like a box or a cylinder it works fine (as i intended) but with my module it doesn’t, at high setings … because of an error … that i don’t know . i will post here the print screens …
Can anyone explaine me how to solve this problem please !
this is the script:
linie = $line01 – necessary change name
obiect = $hedge – necessary change name and convert to mesh
len = curvelength linie
x = 20
uStep = x / len
for u = 0.0 to 1.0 by uStep do
(
pozitie = lengthInterp linie u
tan = lengthTangent linie u
n = random 0 360
rot = eulerangles 0 0 n
copy obiect pos:pozitie name:(uniquename “modul”) wirecolor:red isSelected:on
rotate obiect rot
)
myArray = $modul* as array
deleteItem myArray 1
for o in myArray do
(
z = random 0.8 1.2
scale o [z,z,z]
)
for myObjects in myArray do
(
attach $modul01 myObjects
)