proc
daycycle()
lit = 1 - lit
if(lit)
overlays += 'black25.dmi'
sleep(3) // pause a moment
overlays -= 'black25.dmi'
overlays += 'black50.dmi'
world << "<center><font face=Papyrus><font size=3><font color=blue>The sun goes down as darkness shades the world...</center>"
var/x = rand(1,35)
var/y = rand(1,35)
var/obj/spawner/Wolf/O = new O(O.loc = locate(x,y,1))
else
overlays -= 'black50.dmi'
overlays += 'black25.dmi'
sleep(3)
overlays -= 'black25.dmi' // remove the dither
world << "<center><font face=Papyrus><font size=3><font color=blue>Sunlight comes over the hilltops...</center>"
for(var/obj/spawner/Wolf/W in world)
del(W)
spawn(15000) daycycle()
Problem description:
Anyways, my problem is that I get an error...
cycles.dm:46:error:O: compile failed (possible infinite cross-reference loop)
cycles.dm:46:error:O.loc: compile failed (possible infinite cross-reference loop)
What I am trying to do is when the world turns to night, I want some spawn obj's randomly placed around the world. In this case..a wolf. And when it turns back into day, the spawners get deleted. Anyone know what the problem is?
I would do it like
new/obj/spawner/Wolf(locate(x,y,1))
Have fun.
-Exophus