PDA

View Full Version : Script will not work after a random time...


Floating_Inkpot
07-01-2008, 10:19 AM
Hello,
I have a little problem,

Sometimes i use the floatscript controller to control objects.
For example : i want to control the pos X by another object pos X.

So the script is very simple:

"$object.pos.x"

That is working fine... until i reopen the file later, change the timeline and sometimes my script stops working after a random time...

My object follows the other one as wanted. At frame 200 it suddenly stops, and i dont know why. I have no key in the scene. If i delete the floatscript and recreate it will work fine... until i reopen the file later. The problem will be back.

Is there a solution to avoid that ? Its getting me crazy ^^


Thanks for you help,

shibumenon
07-01-2008, 11:24 AM
WHich version of max are you using?

You shouldn't use the object name directly.
Create a variable within the script controller, assign that variable to the required node, and use that variable name instead of
"$object"

JHN
07-01-2008, 11:37 AM
I think the main problem lies in the controller range... Some controllers have ranges in which they work. Beyond that range it simply stops. This range is most of the times dictated by the time range on the time you applied the script controller. My guess is that you had a time range of 0F to 200F when assigning the controller.

Controller ranges can be adjusted in the dopesheet, switch your dopesheet to ranges and extend the range for the controller. There are some scripts on scriptspot, that will search your scene and lengthen the range to a desired range.

So when applying script/expression or any other controllers it's safe to set your ranges to start -1000F, end 10000F...
That way you'll always have enough range on your controller.

-Johan

Floating_Inkpot
07-02-2008, 09:12 AM
Nice ! Its working perfectly now :)
Thanks a lot

CGTalk Moderation
07-02-2008, 09:12 AM
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.