You’ve got it.
Pretty much my process was:
- On load build a list of lights called 'available_lights'
- Every frame or two, rank each empty/light hook. Then working from the start of the list:
- If one of the top lights:
- If there is a light in available_lights, grab it, set energy to zero
- ramp energy up
- If the light is not one of the top ones, ramp energy down.
- If energy equals zero, place in available lights list