Noob for loop help!

Hi,

I'm hoping some one can help... I'm attempting my first max script, so excuse my ignorance!

I would like the script to create a hair that grows from an object... I have achieved this. What I would like to now do is use a for loop so it can repeat that operation with random seeds  I seem to have a problem with the variables.. I've attached a screen grab.. could any one advice on how I should write that part?

many thanks,

Matt

AttachmentSize
screengrab.jpg373.62 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Matt_2015's picture

.

.

sable806's picture

Error

Can you provide us the error that it returns.

If i understand correctly you need to loop 5 time and each time assign random values to hair ? I think your error comes from the loop declaration.

Try to replace this :

for i = 1 do *5
(
-- YOUR CODE --
)

with this :

for i = 1 to 5 do
(
-- YOUR CODE --
)

This is a working chunk of code that will loop 5 times before exiting.

Matt_2015's picture

thanks for that...great help

thanks for that...great help :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.