I need a full script that can flash a light at random intervals for lightning simple as that
asked Jan 15 '11 at 12:15 AM
This is a real quick idea, you'll want to play with the numbers, but you should get the ideas. Attach to a DirectionalLight I would think.
thresh is the minimum threshold between 0 and 1 that a random number must exceed to turn the light on. minTime is the minimum time interval to check that random number.
A more realistic effect might have a 'strike check' time (between 'strikes') and each strike would be 'on' for some small amount of time, during which rapid flashing would take place. I'll leave that to you.
answered Jan 15 '11 at 01:13 AM