Open oNyaaaa opened 3 years ago
Tried using print(render.GetLightColor( LocalPlayer():GetPos() )) doesn't really do anything other then give a vector 0 0 0 for darkness
You can use render.GetLightColor
, render.ComputeLighting
and render.ComputeDynamicLighting
to calculate the light level at a certain position.
Okay, Thanks i guess, Would've been better of there was a hook.
Details
Add a hook lua code for getting the darkness
also a player:IsInDarkness hook too!
hook.Add("Darkness", "Lua", function(ply,light,darkness) if light then print("we're in the the light") end if darkness then print("we're in the darkness") end end)
gm_construct has darkness areas where you can't get the pitch of the darkness in lua, I've looked on the wiki!