[Closed] self targetting script controller
Hi everyone, thank you in advance for your interest and time.
basically, i am trying to do some offset animation. set the key frame on the first object(objA), and have the rest of the object imitate the same animation as objA, but with delay.
i wanted some control on the delay, so was thinking of adding a custom attribute called "timeOffset" on each objects i wanted to delay, and insert number of frames i wanted that specific object to offset.
i was thinking of using script controller somewhere along the lines of..
at time (F+[b]this[/b].timeOffset) ($objA.pos.z)
basically this is what i was hoping to the parent object where the script controller is.
so basically i was hoping i could just copy and paste same script controller function, and they will read their own custom attributes, rather than having to edit each one of them to individually target to themselves.
however, i am finding that no such function as this exist in scriptController.
anyone could point me in the right direction?
edit:
[b]actually, after further research, it seems that this is a valid command in script controller, however, it seems to target the actual script controller track it self. i guess then the question is, are there any way of getting “parent object” of the current target controller?
i guess what i am looking for is
this.parent[/b]
[b]above code does not work unfortunately.
Thank you all in advance
[/b]
thanks floopyB, works great!
infact, i have used “dependentNodes” before on my scripts previously, but guess i been blinded by looking for a simple way out.
again thank you very much for your help : )
but i guess i was looking for a script controller i could just copy and paste to other controller, while having control over the offset via custom attributes
thanks!