Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Running a function or script on move
  RSS 2.0 ATOM  

Running a function or script on move
Rate this thread
 
64112
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 28 July 2007 08:39 PM

Hi guys,

Is there a way to run a function or a script when something got moved? As in.. when I move a spline knot I want a vert on a EPoly object to move as well.

Thanks!

R.



Replies: 0
avatar
  • howiem
  • Posted: 11 February 2012 05:19 AM

Sounds like you just want the position controllers of the two vertices wired together?

- Make sure the vertices in question (on both objects) have animation controllers on them, simply by animating them (if you haven’t already). Has to be at the sub-object/vertex level, not the whole object. Nudge them a bit. Even if you delete the keyframes afterwards, the act of animating them forces Max to assign a controller to the individual vertices (Max doesn’t bother assigning controllers to things until they’re needed)

then:

- Open the Parameter Wiring dialog box (under Wiring on the Animation menu)
- Find the objects you want to link in the left and right sides, and drill down into each tree until you get to the individual vertex’s controller, usually under “Master : Reference target” or “Master Point Controller”.
- With those controllers selected, click one of the arrows between the boxes to tell Max which controller is in charge. Arrow should point at the slave.
- Click ‘Connect’.

That Parameter Wiring dialog is just a quick way of sticking expression controllers on things. If you need more functionality, you can always find the vertex controller by drilling down into track view. Right-click it and choose properties, and play with the expression - you can do time-based stuff, or combine information from a number of controllers on different objects. Have rotation of one object be based on the position of another, that sort of thing.

Oh, this is from Max 9, but I can’t think they’ve changed it substantially. Someone’ll chip in if I’m wrong I hope…



Replies: 0