# Creating an expression that controls my blink?

**URL:** https://forum.highend3d.com/t/creating-an-expression-that-controls-my-blink/5994
**Category:** Maya
**Tags:** mel
**Created:** [July 26, 2002, 8:22pm UTC](https://forum.highend3d.com/t/creating-an-expression-that-controls-my-blink/5994 "2002-07-26T20:22:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kmcall2](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@kmcall2](https://forum.highend3d.com/u/kmcall2)
#### Post date: [July 26, 2002, 8:22pm UTC](https://forum.highend3d.com/t/creating-an-expression-that-controls-my-blink/5994/1 "2002-07-26T20:22:45Z")

</div>

Hi,

I have setup a blink blendshape and would like to write an expression that makes the blink happen randomly every 8-15 secs in my animation. Does anyone know an expression that can do this? Please help. Thanks  
Loked

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [July 28, 2002, 2:27pm UTC](https://forum.highend3d.com/t/creating-an-expression-that-controls-my-blink/5994/2 "2002-07-28T14:27:45Z")

</div>

Well there are several ways of doing this. one would be to randomize a number then wait that amount of time then randomize again...

But this is computationaly abit uneffective. So i suggest you connect a noise function (which in turn is connected to time.) into a condition node and try to find a suitable ratio for such an effect (however ensuring that the blink happes 8-12 seconds appart is a bit hard).

But theres a trick you can try... you could use a common blink every 10 seconds. Except you feed the expression a custom time that advances at varied speed.

---

<div class="post-metadata">

### Author: ![kmcall2](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@kmcall2](https://forum.highend3d.com/u/kmcall2)
#### Post date: [July 28, 2002, 7:28pm UTC](https://forum.highend3d.com/t/creating-an-expression-that-controls-my-blink/5994/3 "2002-07-28T19:28:21Z")

</div>

Hi,  
Thanks for the reply, but do you think you could be a little more descriptive. Maybe you could actually write the expression or at least the basis of it. Thanks.

Loked
