smallg has made a flashlight script that makes it need batteries and it fades to nothing when they're running out. It's in his script thread somewhere, maybe you could look at that to see what variables he is playing with.
https://forum.game-guru.com/thread/207801?page=11#msg2535353i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.