MrCafeae Posted November 22, 2009 Share Posted November 22, 2009 I am attempting to write a script that does different things based on the amount of visible light. If it's daylight it does one thing, if it's night another, if player is inside and light is bright it does a third thing and if the light is dim but not dark it does a fourth. So, is it possible to get the amount of visible (ambient?) light in a scene? I'd appreciate any pointers (or links) in the correct direction on this. Thanks in advance. Link to comment Share on other sites More sharing options...
gsmanners Posted November 22, 2009 Share Posted November 22, 2009 For outside, just use GetCurrentTime and IsInInterior. Testing for light is tricky, but you might be able to get a good idea with something like creating a fake, invisible NPC nearby and then using GetDetectionLevel (which varies depending on the light level). Link to comment Share on other sites More sharing options...
MrCafeae Posted November 22, 2009 Author Share Posted November 22, 2009 Invisible NPC, hadn't thought of that one. I'll give it a shot. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts