Hey, i've run into a rather strange bug with my game. I've programmed a day/night cycle where a surface is created once the time reaches a certain point in the day, but for some reason the darkness won't draw. It draws in a "test" project i made for quicker testing but the code, which is almost 100% copied identically doesn't want to work in my main project.
This is what it looks like in the "test" project (that i used to create it and test it more quickly):
(the 0.15 is an incrementer that changes how dark or light it is)
and here's all the code:
The control object:
The light object:
Yup, that's pretty much it. It works in my test project, but when i moved the code over to my main project, this is what i get:
It should be about 50% opaque right now, but there's no darkness at all. Yeah there were some very slight changes made to the code, but it should still work....but it's not :v Here's the code, this time from my main project. The surface is handled in a control object that handles weather and time of day changes. I only included the parts of the object that controls or refers to the surface in some way
And yeah that's about it. Of course, i check for and remove the surfaces when they're no longer needed, but that only happens when the room ends or it turns day time again. So is anyone able to tell me why the surface/darkness won't draw?
Edited by smbmaster99, 28 March 2016 - 04:24 AM.