Forum Replies Created

Page 162 of 1081
  • Dan Ebberts

    December 15, 2019 at 4:43 pm in reply to: Infinity counter

    I’m not sure if you’re aware that expressions can’t retain any info from frame to frame (apologies if you already knew that). But this should work:

    Math.floor(time%10);

    Dan

  • Dan Ebberts

    December 13, 2019 at 7:59 pm in reply to: Use ease() expression with for loops

    What’s controlling the timing of the moves, comp markers? If so, you expression needs to figure out which two markers the current time is between and use that to determine how far along it should be in the ease between the positions corresponding to those two markers. Something like this probably:


    m = thisComp.marker;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    if (n == 0){
    val = thisComp.layer("Name " + 1).transform.position;
    }else if (n == m.numKeys){
    val = thisComp.layer("Name " + m.numKeys).transform.position;
    }else{
    inPos = thisComp.layer("Name " + n).transform.position;
    outPos = thisComp.layer("Name " + (n+1)).transform.position;
    val = ease(time, m.key(n).time, m.key(n+1).time, inPos, outPos);
    }
    [val[0],val[1],value[2]];
    }else
    value

    Dan

  • Dan Ebberts

    December 13, 2019 at 7:21 pm in reply to: Use ease() expression with for loops

    At each frame, the result of an expression will be the last thing it calculates. What are you trying to get it to do?

    Dan

  • Dan Ebberts

    December 13, 2019 at 6:32 am in reply to: Rotation with duration, holds for 1 sec. then repeats

    Like this probably:


    tStart = 3;
    if (time >= tStart){
    segDur = 1;
    rampDur = 5*thisComp.frameDuration;
    degrees = 36;
    t = (time - tStart)%segDur;
    seg = Math.floor((time-tStart)/segDur);
    degrees*seg + linear(t,0,rampDur,0,degrees);
    }else
    0

    Dan

  • Dan Ebberts

    December 12, 2019 at 5:41 pm in reply to: Rotation with duration, holds for 1 sec. then repeats

    Not tested, but it should be like this:

    tStart = 3;
    f = timeToFrames(Math.max(time-tStart,0));
    value + Math.floor(f/3)

    Dan

  • Dan Ebberts

    December 10, 2019 at 11:36 pm in reply to: Control Text Repeater with sliders

    I don’t think you’re going to be able to do anything like that using JavaScript’s string.repeat() function.

    Dan

  • Dan Ebberts

    December 10, 2019 at 11:11 pm in reply to: Control Text Repeater with sliders

    What would the result of that look like?

    Dan

  • Dan Ebberts

    December 10, 2019 at 5:16 pm in reply to: Comma used in slider WITH text

    Try replacing:

    [num]

    with:

    num + ” views”;

    Also, you should move the function to the top of the expression.

    Dan

  • Dan Ebberts

    December 10, 2019 at 5:01 pm in reply to: Linking rotational value correctly to a compass graphic

    I think you just need to get rid of the “-” operator at the beginning of your text expression.

    Dan

  • Dan Ebberts

    December 10, 2019 at 8:01 am in reply to: Linking rotational value correctly to a compass graphic

    Maybe like this then:

    w = wiggle(0.2,60);
    w %= 360;
    w += (w < 0) ? 360 : 0;

    Dan

Page 162 of 1081

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy