PDA

View Full Version : Scripted Controller: get corresponding node


MatthiasBuehlmann
10-10-2006, 07:03 PM
Hi!

I'm using scripted controllers which depend on other properties of the object they are assigned to. So i need to reference to this object in the script.
I read in the maxscript that there is no way to get the node the controller is working on expect for this one:


refsArray = (refs.dependents this)
for i in refsArray where isvalidnode i do (mynode=i)


But this doesn't really work since refsArray may contain more than only one node where isvalidnode i is true.
If there is another way to get the node the controller is working on, PLEASE tell it to me.

Now it thought ich could assign the controller script by another script. a little user interface, where you can pick an object and then assign the scripted controller and this interfaces script automatically adds a script controller, copies the script in the script controller and adds a variable with the reference to the object the controller just got added to.


Is this possible? and if yes - how do i add the script by script to the scripted controller?


Thanks!

PEN
10-10-2006, 07:35 PM
What track is this script controller on. You might be able to add the node to the script controller itself.

MatthiasBuehlmann
10-10-2006, 09:36 PM
the controller is in the secound slot of a rotation list. But why is this important? does it matter where it is?

Ss there another way besides a scripted controller to create a script which gets executed every frame or everytime there is an interaction with a certain object?

CGTalk Moderation
10-10-2006, 09:36 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.