Ill (hopefully) point you in the right direction until someone gives you a better answer.
Create a global variable called light and give it a value of 100(or anything).
then start an event -> every 1(or x) seconds
-> subtract 1 from light.
(That will make it gradually reduce the light variable).
Make an object. Add event -> on overlap with player
->add 10 to light.
(that will fill it up when the object is stepped on).
Then all you need is to apply darkness based on the number in the light variable.