PDA

View Full Version : Script Controller stops response during animation


GallenWolf
04-09-2005, 07:26 AM
Hi!
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
then
(0;)
else
(2;)

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!!!

GW

marktsang
04-09-2005, 01:35 PM
have you checked the ranges on the script controller ?

mark

GallenWolf
04-09-2005, 01: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.

TIA!

GW

GallenWolf
04-09-2005, 01:44 PM
marktsang, thanks mate! Happened to post reply with ya at the same time :)

GW

CGTalk Moderation
04-09-2005, 01: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.