Forum Replies Created

  • Jesse Lucas

    September 23, 2009 at 4:01 pm in reply to: Seting the inital state of a variable (Fuse)

    Thank you very much Dan. It looks like a nice solution.
    Too bad I didn’t just check your site before I posted.
    By the way, its nice of you to share all this valuable information.
    Have a nice day !
    Jess

  • Jesse Lucas

    September 23, 2009 at 9:27 am in reply to: Seting the inital state of a variable (Fuse)

    Ok I’ll try and explain my problem again.

    I’m using a 3D light and I want it to randomly blink (like a broken neon).

    So I need the light to have 2 states :
    – Normal state, the light stays on
    – Blink state, the light blinks randomly

    In the code provided the “fuse” variable sets the state of the light. But I just can’t find a way to create the variable at code runtime.

    Any clue ?

    if (time == 0) {
    fuse = 0;
    }

    level = 270;
    amp = 100;
    if (random() > 0.9 && fuse ==0) {
    fuse = 1;
    }

    if (random() > 0.5 && fuse ==1) {
    fuse = 0;
    }

    if (fuse == 1) {
    noise(time*10) * amp + level-amp;
    } else {
    level;
    }

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