|
|
Hy all!
My problem is the following:
#declare sk=1;
#if (clock<55)no_image
#end
#if(clock>=55)
#if((clock-54)*5<25.9)#declare sk=(clock-54)*5;
#else #declare sk=25.9;
#end
#end
scale <sk,sk,sk>
When clock reaches the 55 value, it should be scale in every clock after that,
and when sk would be =30, then it scale get 25.9.
My problem is nothing happens. But why?
the object I try to animate remains invisible.
Help me, pls.
If I write scale 25.9, the object appeares good.
Post a reply to this message
|
|
|
|
> Hy all!
>
> My problem is the following:
> #declare sk=1;
> #if (clock<55)no_image
> #end
> #if(clock>=55)
> #if((clock-54)*5<25.9)#declare sk=(clock-54)*5;
> #else #declare sk=25.9;
> #end
> #end
> scale<sk,sk,sk>
>
> When clock reaches the 55 value, it should be scale in every clock after that,
> and when sk would be =30, then it scale get 25.9.
> My problem is nothing happens. But why?
> the object I try to animate remains invisible.
> Help me, pls.
>
> If I write scale 25.9, the object appeares good.
>
>
It depends on how you use the clock and initiate your animation.
If, for example, you start your animation using +kff100, then, the clock
variable will go from 0 to 1. It will nefer reatch the value of 55, and
thus, the first #if will always evaluate as true and set no_image.
Change the your code as follow:
#declare sk=1;
#if (clock< 0.55)no_image
#end
#if(clock>= 0.55)
#if((clock- 0.54)*5<0.259)#declare sk=(clock- 0.54)*5;
#else #declare sk=25.9;
#end
#end
scale <sk,sk,sk>
Then, you can combine the tests:
#if (clock < 0.55) no_image
#else // This replace "#if(clock>= 0.55)"
#if((clock- 0.54)*5 <0.259) #declare sk=(clock- 0.54)*5;
#else #declare sk=25.9;
#end
#end
You may need to adjust the value of the sk variable to acount for the
effective range of the clock variable and it's derived values.
Alain
Post a reply to this message
|
|