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
ID:268483
Aug 13 2004, 12:00 am
|
|
Erm, example...
proc Or something like that... but it doesn't show up... =/ Thanks for your help. :P |
In response to Crispy
|
|
Heh... >_>
proc That, quite doesn't work... BUT... If I make an object, it does... =/ So, I dunno'... |
- 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:
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. =)