ID:272633
 
Ive used this system for a while now but I want it not to spammed all over the map I want to be able to map it into certain places and not only that I need to make luminosity toggle every so often its given me headaches trying to think of ways and also the loops are driving me around the bend.

Heres what I got:
area/outside
layer=99
luminosity = 0
proc/Weather() while(1)
for(var/area/A) A.icon=pick(null,'Rain.dmi','Snow.dmi') //and so on
sleep(2000)
world/New()
spawn Weather()


The spawn Weathers how ive been doing it reasently but it may have to change if its possible and also luminosity toggle added in to the loop.
For that you need to have multiple area instances. The simplest way is to have different area subtypes for each area, so:
area/outside
city
forest
mountain

...etc, then assign them respectively on the map. Changing any of the rest of your code is not strictly required. Also, you should be able to figure out how to change the area's luminosity like you're changing its icon on your own, I'm not spoonfeeding you that.
In response to Kaioken
lol ok... ty for the first bit lol now it on my loginscreen and ill try and do the luminosity its a bit easier now that ive got that out the way
In response to Myrddin Productions
area
outside
layer=99
luminosity = 0
proc/Weather() while(1)
for(var/area/outside/A) A.icon=pick(null,'Rain.dmi','Snow.dmi')
for(var/area/outside/A) A.luminosity=pick(0,1)
sleep(2000)
world/New()
spawn Weather()


Can you guys see any bugs i think i got it all working but can you see anything wrong or anything you'd do instead?
In response to Myrddin Productions
Um... looks like you urgently need to read the DM Guide. Ever heard of code blocks and indentation? You can have more than one statement in the same block, such as one belonging to if() or for(). Incidentally, your while() loop there has multiple statements indented under it in a big block.
In response to Kaioken
Well I like it like that how would you format it??
In response to Myrddin Productions
 area
outside
layer=99
luminosity = 0
proc/Weather()
while(1)
for(var/area/outside/A)
A.icon=pick(null,'Rain.dmi','Snow.dmi')
A.luminosity=pick(0,1)
sleep(2000)
world/New()
spawn() Weather()

I'd do it kinda like that.