View Full Version : Help with Maxscript

04 April 2012, 12:01 AM
Hello everyone, I'm new to the forums. I have been reading them for a few years now, but am now starting to get more proactive with scripting, but am in need of some help with what I'm trying to do.

I want write a script that can simplify an animation along a path. The concept is as follows:

Before script work:
Create "line01" as the path to constrain a dummy.
Then create "dummy01" and constrain it to line01.
Then create "line02" directly above line01 (These two will be aligned vertically from one another in the y-direction).

What I want the script to do:
Measure distance (d) from "dummy01" to "line02".
Then insert "d" into the equation "V = (sqrt(64.3*d))/2" to solve for "V".
I want "V" to then be inserted into the equation "(V*(1/6))/(line01 length)".
This should return a value of percentage along the spline that dummy01 needs to move forward.
This value needs to somehow be added on to whatever percentage dummy01 is already along line01.
Once they dummy has been moved, the script should place a key 5 frames from current frame. I want this whole process to repeat until I reach the end of line01.

This should represent some type of dynamics for the dummy along the spline. I used to manually key this process, and the time has come to automate it.

Thank you in advance for your help! Hopefully, as I progress with my training I will be able to give back to the community.


04 April 2012, 01:32 PM
For a little visualization of what I'm trying to do:

You can see the line01 that the dummy is constrained to, and line02 that is directly above.

CGTalk Moderation
04 April 2012, 01:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.