Lighting in the virtual world
Several months ago I decided to go to a disco and because there were so many people the lag was unbearable. So I kept my graphics to a minimum. When I returned to my virtual home, I forgot to put the graphic configuration as I had previously. I noticed something very strange, it was totally dark but the lights were not on. One of the most basic scripts that can be done is to detect when it is night or day. If it is night, turn on the lights automatically. But my script apparently didn't work, why? To investigate the matter, I built a tool that marked the position of the sun. The script comes below: string GetTimeOfDay ( float dayFraction ) { integer hours = ( integer ) ( dayFraction * 24 ) ; integer minutes = ( integer ) ( dayFraction * 24 * 60 ) % 60 ; integer percent = ( integer ) ( dayFraction * 100 ) ; return ( string ) hours + " : " + llGetSubString ( ( string ) ( 100 + minutes ) , 1 , 2 ) + " ( " + ( string ) pe