PDA

View Full Version : Help needed for small move script


mmrender
01-09-2008, 08:35 AM
Hi,
I'm looking for a simple script to move one object in z axis controlled by other object. The way I see this would be to get first the z position of the pivot point from the control object via script, and then apply it to the z axis of the one that I want to move.

I know that there are ways, other than scripting, for doing this but those won't work in the case I have. I must say too, that I have no idea of scripting so any help will be useful.

thanks in advance,
Manuel

RustyKnight
01-09-2008, 09:19 PM
Hi,
I'm looking for a simple script to move one object in z axis controlled by other object. The way I see this would be to get first the z position of the pivot point from the control object via script, and then apply it to the z axis of the one that I want to move.

I know that there are ways, other than scripting, for doing this but those won't work in the case I have. I must say too, that I have no idea of scripting so any help will be useful.

thanks in advance,
ManuelIt sounds like you want to perform a parameter-wire...is this correct?? Or is there some reason that won't work?? You CAN connect and object this way via script?

I think the only other way would be to use a scripted-controller, but I tend to really only use those when I have to...

Shane

cyfer
01-10-2008, 01:06 PM
i'm not sure i follow ...
RustyKnight did answer you
does this help ?

__Obj1 = box pos:[0,0,-50]
__Obj2 =Sphere Pos:[-10 , 200 , 50]

__obj1.position.controller.Z_position.controller = Float_Script()
__obj1.position.controller.Z_position.controller.script = "__Obj2.pos.z "

with animate on (
sliderTime = 50
__Obj2.pos.z =-100
SliderTime = 100
__Obj2.pos.z =100

)
SliderTime = 0
PlayAnimation()

CGTalk Moderation
01-10-2008, 01:06 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.