[Closed] assigning value in expression ctrl
Hey, I’m all new to MAXscript and would like to get the code for the following. I have o lot of copys of an objects, they should all line up after a path. I’ve made an expression for the position with a constant, the constant’s value for object “i” should be “i”. If I assign the correct value for all the objects, the objects move and correctly.
Can someone please direct me in how to write the code for: selecting object name”i”, going into they’re postion expression controler and declare a constant with a value depending on i?
Unfortunately, you can’t access expression controllers by maxscript
Martijn
OK
I made it with an script ctrlr instead. Sat whole night to learn the stuff so now I got almost everything done.
BUT. I try to declare a position for frame 0 using “at time 0 return<expression>”and I get a message
– Return: not inside a function
The help file says
“As a special case, you can exit a script controllers script using a return <expr>. “
How can this be?
The last value of the script block is that wich is applied. So
at time 0
(
expresion
)
and you get it