ID:268483
 
Erm, example...
proc
Day_And_Night()
for (var/turf/X in range(world))
X.overlays+=obj/dark

Or something like that... but it doesn't show up... =/ Thanks for your help. :P
A few problems there:

- On the third line you posted: You want just "world", not "range(world)". range() doesn't work like that.
- On the last line you posted: You need to either create an object using <code>new</code> (WARNING: this is SLOW when you do it once for every single turf in the game), or add a .dmi instead of adding an object (this is the better option).
- It would be slightly faster to add the overlay to all /area objects, rather than all /turf objects.

Here's a better way:

proc/Start_Night()
for (var/area/A in world)
A.overlays += 'dark.dmi'


An even better way is to use this excellent library, if you can afford the $1/month subscription to BYONDscape (believe me, it's worth it): hub://Shadowdarke.sd_DynamicAreaLighting
That way you get spiffy lighting effects as well. =)
In response to Crispy
Heh... >_>
proc
Night()
for (var/area/A in world)
A.overlays += 'Dark.dmi'

That, quite doesn't work... BUT...
If I make an object, it does... =/
So, I dunno'...