-
Adding noise/wiggle to a loading bar without it going backwards.
I want to imitate an old mac loading bar. I have a linear wipe linked to a slider. I started with a time expression to go from 0-100, but I want the bar to occasionally jump ahead, inconsistently. Basically, I want a “wiggle” expression that only adds to the value of the slider and never decreases.
Adding any sort of wiggle always causes it to jump backwards. I have tried many different methods and it still jumps. Is there any way to constantly add a random value each frame, the same way “time” adds 1 each frame, except a random amount added, without it jumping backwards.
One method I was attempting, was using a “while loop” to continuously repeat the task of adding to n until it reaches 100, but there is no way to add delay to the while loop so it just executes immediately.
I attempted the following expression to see if I could use “time” to increment the value so it would repeat until a number of seconds:
i=0;
n=0;
while(i<10){
i=time;
n++;
};
nbut this caused the expression to get disabled due to timeout.
If there was a way to add a random value each frame, or delay a for/while loop to only execute each frame, then that would be perfect because I could make the added amount equal to a wiggle expression.
Alternatively, if this would be easier with time remapping and I could randomize the speed of the slider, that could work too, but I would prefer to apply it at the slider level instead of precomping and time remapping.
Any advanced expression people have any ideas?
Thanks!
Evan