View Full Version : Script Controller stops response during animation

04 April 2005, 06:26 AM
I am setting up an automated animation system, where a PFlow object launches projectiles at a target when the target arrives within a certain distance.

I have an odd issue though. I am using a Float Script controller on the PFlow's rate value, with a script as such:

dependsOn $cannon $target $cannonCPU
if (distance $cannon $target) > $cannonCPU.modifiers[#Attribute_Holder].Custom_Attributes.distance

So when the target is out of the distance, the pflow will not fire, and vice versa. However in pratice, the script oddly stops working around the 200 frame mark (animation length is set from -10 to 350, and I've set the pFlow to be active between -10 to 400.... I've attached the trackview of the rate and .max file. Thanks for any advice!!!


04 April 2005, 12:35 PM
have you checked the ranges on the script controller ?


04 April 2005, 12:43 PM
Ok my fault. I have found the problem! Evidently I didn't adjust the keys in the dope sheet. Argh!

But there seems to be another problem - the cannon fires off a single round at the very start of the animation. Do you guys know why?

I've included the updated max file with this post.



04 April 2005, 12:44 PM
marktsang, thanks mate! Happened to post reply with ya at the same time :)


CGTalk Moderation
04 April 2005, 12:44 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.