Jump to content

[help] Variable light brightness


Recommended Posts

Hello everyone! I'm fairly new to the game and just made it to the surface, and have found inspiration for a mod; I'm attempting to make a "skylight tile", to make sunlight easier to use for base lighting. The basic idea is that I would copy a regular glass tile and
1 - remove its transparency so it cannot allow the sunlight directly through
2 - generate a light cone like a ceiling bulb
3 - Instead of a constant 1800 lux, have the light it generates be a function of the illumination received on the top of the tile (say, 15% of the sunlight)

I had hoped I could just copy & paste my way to victory, but I'm having a bit of trouble on part 3 making the light brightness change. At the moment I'm just trying to use "(int)Game.Instance.currentSunlightIntensity", but from my (limited) understanding it looks like there is nothing in the "Light2D" class that can allow light to change with time. But it must be possible to do in game though, because that's how the sunlight works, right? I imagine there is something fundamental I am not getting.

Well, at least in the meantime I've got these magical glowing tiles :P.

 

Short version: is it possible to make a light source that varies in intensity over time? (My modding & coding experience is quite minimal so I apologize if this is an obvious/asinine question)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...