i am totally new in scripting and i need some help. can you please post me a script where ich can play a movie randomly? Its for blinking eyes of an character.
The movie-sequence shuts the eyes and i already names the frame “blink” and it will rewind to frame 1
So it tried something in action - BUT I KNOW THAT THIS IS TOTALLY WRONG!!:
stop();
set var = “number”
set var = “count”
number = random (0-1000);
count from 0-1000
if(count=number){
play “blink”
}
end if
Thanks, guys, the first script from brainy works fine - but i decreased the amount of blinks by setting the value to 0.01
But what does this means? I mean what is this number? First i set this to 3 but then nothing happened… (just for understanding the way to script random things…)
well, Math.random returns a random number between 0 and 1. so if you check if its lower than 0.01, you have about a 1% chance of “blinking”… (as its 0.01 times blink versus 0.99 not blink)… see my point?