Notifications
Clear all

[Closed] Help with Maxscript

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.3d))/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.

Adam

5 Replies

i believe you’ve also got a wrong spelling on “type:#interger” (should be integer) … sometimes rollouts wont work or show where the bug is if the error comes from the rollout definition …

dang, i mustve missed this way back, i never stumbled upon (or rather never recalled) the tutorial you guys are talking about … could someone point me to a link? :):)

 rdg

Not sure but I think it’s a tutorial from GavinB from CGTalk.
You find them here:
http://www.scriptspot.com/start.htm

Georg

Renzo,

2 typos only:

  1. labels#( –> labels:#(
  2. type:#interger –> type:#integer [as galagast pointed]

Light

thanks rdg! I almost forgot that scriptspot has a lot of tutorials aside from scripts itself. (excellent resource)

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.