| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
hpl2:tutorials:script:player_blink [2013/07/08 22:12] amn |
hpl2:tutorials:script:player_blink [2013/12/19 20:01] (current) amn |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Player Blink ====== | ||
| + | |||
| + | |||
| This simulates an eye blink every 6~10 seconds. | This simulates an eye blink every 6~10 seconds. | ||
| Line 10: | Line 13: | ||
| { | { | ||
| FadeOut(0); | FadeOut(0); | ||
| - | FadeOut(0.1); | + | FadeIn(0.1); |
| } | } | ||
| </code> | </code> | ||
| Line 16: | Line 19: | ||
| <code php> | <code php> | ||
| - | void BlinkTimed() | + | void BlinkTimed( string &in asTimer ) |
| { | { | ||
| Blink(); | Blink(); | ||
| Line 28: | Line 31: | ||
| <code php> | <code php> | ||
| - | void OnStart() | + | AddTimer ( "", RandFloat(6,10), "BlinkTimed" ); |
| - | { | + | |
| - | AddTimer ( "", RandFloat(6,10), "BlinkTimed" ); | + | |
| - | } | + | |
| </code> | </code> | ||