if range is inbetween...

   1904   2   0
User Avatar
Member
30 posts
Joined: March 2006
Offline
Hey, I got a simple expression on the lenght of a polyextrude So it's linked to time:

if($F>20,($F-20)*0.1,0)

works fine.

Thing is I wanna make it stop when it reaches frame 30. I've tried if($F>20<30,($F-20)*0.1,0) and other combinations but nothing gives the desired result.

I tried clamping as well with no luck. any ideas?

cheers!
User Avatar
Member
94 posts
Joined: April 2011
Offline
this expression might works:
if(($F>20)&&($F<30),($F-20)*0.1,0)
The sign && indicates is the equivalent of “and” in English terms, so it will be true only if the frame number is greter than 20 and less than 30.
User Avatar
Member
30 posts
Joined: March 2006
Offline
Nice! Very c++. But it just reverts to 0 in lenght after 30 frames.

I found an other solution: clamp.

clamp(($F-20)*0.1,0,1)

Cheers!
  • Quick Links