ScriptSpot

Forum topic · Scripts Wanted

Light Control - Random Switching

By brightstar · 2011-10-04

Description

Hey Guys,

Looking to get some help writing a script that can control >1000 lights.

Basically I have a scene with 1000 lights where I need to have each light individually turn on, 1 at a time, and in a random pattern.

So the end result would be each light turning on over a long period of time until all the lights are at full power.

Any ideas?
j

Comments (1)

Anubis · 2011-10-04

wait a min... you want to animate the lights miltiplier, right?

range = [1, 100]
for lt in Lights do (
	rndTime = int(random range[1] range[2])
	ctrl = lt.multiplier.controller = Bezier_Float()
	key1 = addNewKey ctrl (rndTime - 1)
	key2 = addNewKey ctrl rndTime
	key1.value = 0.0
	key2.value = 1.0
)