Notifications
Clear all

[Closed] Help needed for small move script

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

2 Replies
1 Reply
(@rustyknight)
Joined: 11 months ago

Posts: 0

It 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

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()