AddTarget - Float scripts
Hello,
How can i use the AddTarget option in float scripts? I dont't want to write a new script to solve this problem, but where i have to write this "AddTarget" to make it works, and what i have to write punctually?...
I searched for solution on scriptspot and cgtalk, but i didn't found what i want, only separated scripts which solve this, i think (hope) it could works without any other scripts...
For example: There is three spheres. (Sphere01, Sphere02, Sphere03). I give to the Sphere01 that it's position controller be a float script, and in this script write that "$Sphere02.pos". So it will be always where the Sphere02 is. But if i link the Sphere02 to the Sphere03, and i move the Sphere03, the 01 is not updated by the script. Only when i move the Sphere02...
What i have to do in this case?
Thanks the answer(s) in advance!
Comments
So... I want to use the
So... I want to use the AddTarget option in float script. Because i have a character rig, and there are a lot of cases where is a good opportunity the AddTarget.
This is why i wrote this little example, because more easy to comment on it.
This sphere example is not my problem, it's just a little model of my problem.
The problem is AddTarget usage.
So please if anybody knows how can i use this AddTarget (what is the right usage by an example, and where i have to write this), please let me know.
Thanks in advance and thanks the comments! :)
Hi Matyrix, an example for
Hi Matyrix, an example for AddTarget usage is available in the help - "float_script - FloatController > Target (Track) Variable". I hope this helps.
my recent MAXScripts RSS (archive here)
Really thanks! I don't know
Really thanks! I don't know how could i not found this. But... What the hell is the [4] in the "ctrl.addTarget "myTeapot" obj1[4]" line? :)
Check for "SubAnims" (Indexed
Check for "SubAnims" (Indexed Access to Animatable Properties) :)
my recent MAXScripts RSS (archive here)
Thanks again! This helped me
Thanks again! This helped me a lot. But... I couldn't use it to solve my problem.
I recorded my problem and uploaded here as a video:
http://vimeo.com/14942897
What is the easiest way to solve this?
Strangely, wiring fail, but
Strangely, wiring fail, but float script works here (Max 2009), just as Veneta said, need to move slider to update the controller. Here is my test (screenshot) - I wrote "$Box02.pos[3]" in the expression (without adding target).
my recent MAXScripts RSS (archive here)
It's really interesting. So
It's really interesting. So the main problem was the target usage.. hm.
But thanks your help again! It's work from now, and i forgot the wire parameters for a long time. :)
I not see any problem. In the
I not see any problem. In the described example shpere01 follow sphere02 position even if sphere02 is linked to sphere03 and sphere03 is moved, just need to move the slider to update ;)
Hmm, what is the version of
Hmm, what is the version of your max? I moved the slider but nothing changed... I use 2009.
By the way i hope somebody knows how could be used the AddTarget option :)
You can instance Sphere01 and
You can instance Sphere01 and Sphere02 position controllers.
The float script will not necessary in this case.
my recent MAXScripts RSS (archive here)