ID:143698
 
Code:
mob
Player
verb
Start()
global.DN()


proc
DN()
for(var/turf/T in world)
if(T.outside && T.day)
T.icon_state = "grass1"
T.trans = 1
T.day = 0
spawn(50) DN1()

DN1()
for(var/turf/T in world)
if(T.outside && T.trans)
T.icon_state = "grass2"
T.trans = 0
T.night = 1
spawn(50) DN2()
DN2()
for(var/turf/T in world)
if(T.outside && T.night)
T.icon_state = "grass1"
T.trans1 = 1
T.night = 0
spawn(50) DN3()
DN3()
for(var/turf/T in world)
if(T.outside && T.trans1)
T.icon_state = "grass"
T.trans1 = 0
T.day = 1
spawn(50) DN2()


Problem description:

My day and night system wont work it reaches night lags like hell and wont continue.
make a weather area, and map the area/weather where you want weather, and then make a proc that changes the icon of the area/weather, making weather
In response to Max Omega
way to go and confuse people... and soz i cant help with that...
In response to Max Omega
Max Omega wrote:
make a weather area, and map the area/weather where you want weather, and then make a proc that changes the icon of the area/weather, making weather I want a day and night system not weather
In response to Miran94
Why not start this proc when the world starts?
world
New()//when the worl begins.....
..()//continue with normal operation
DN()//execute the DN() proc

//there is no need to do global.DN() unless you have the proc defined under an atom too.

proc
DN()
for(var/turf/T in world)
if(T.outside && T.day)
T.icon_state = "grass1"
T.trans = 1
T.day = 0
spawn(50) DN1()
return

DN1()
for(var/turf/T in world)
if(T.outside && T.trans)
T.icon_state = "grass2"
T.trans = 0
T.night = 1
spawn(50) DN2()
return
DN2()
for(var/turf/T in world)
if(T.outside && T.night)
T.icon_state = "grass1"
T.trans1 = 1
T.night = 0
spawn(50) DN3() // loop back to 3
return
DN3()
for(var/turf/T in world)
if(T.outside && T.trans1)
T.icon_state = "grass"
T.trans1 = 0
T.day = 1
spawn(50) DN2() // go back to 2
return
//I think the problem here is when you call the DN2() prov in DN3() is just loops is back and forth between DN2 and DN3, why not take it back to DN?