Notifications
Clear all

[Closed] help with a scripted X postion controler

This first scripted controler (height)works fine but the second one X_postion is not working could someone show me the right way to do this ? I think I just got something round the wrong way seems no mater what I try I cant get the box i to follow the controlobject along the X plane.

Any help would be great and guys thanks


if UI_height .checked == true then (	i.height.controller = float_script ()
		 i.height.controller.addNode "controlobject" controlobject 
		 i.height.controller.script = " at time (F - "+ TDelay +") controlobject.height ")
 
 
if UI_X_Postion .checked == true then (	i.X_position.controller = float_script ()
		 i.X_position.controller.addNode "controlobject" controlobject 
		 i.X_position.controller.script = " at time (F - "+ TDelay +")controlobject.pos ")

4 Replies
 lo1

You’re trying to feed a point3 value (controlObject.pos) into a controller expecting a single float value (.x_position).

Use controlObject.pos.x

thank you so much for your reply lo , I did what you said and added the .x but Im still getting this error

Unknown property: “x_Position” in $Box:Box002 @ [-133.643265,0.000000,0.000000]
I still cant work out why its not working

   
 
 for i in selection do (  
TDelay = (Delay + (dist/2)) as string
 
 if UI_X_Postion .checked == true then ( i.X_position.controller = float_script ()
  i.X_position.controller.addNode "controlobject"controlobject			 
  i.X_position.controller.script = " at time (F - "+ TDelay +") controlobject.pos.x  " )
)

 lo1

should be i.pos.controller.x_position.controller

Ah thats fixed it , thanks very much for your help Lo