Code:
obj/fire icon = 'fire.dmi' density = 0 opacity = 0 luminosity = 1 Enter(mob/O) O.health -= 4 step_away(O,src,1) return ..() New() spawn(50) opacity = 1 new src(locate(x+1,y+1,z)) new src(locate(x-1,y+1,z)) new src(locate(x+1,y-1,z)) new src(locate(x-1,y-1,z)) new src(locate(x,y+1,z)) new src(locate(x,y-1,z)) new src(locate(x+1,y,z)) new src(locate(x-1,y,z))
|
Problem description:
Supposedly, the fire will upon being spawned damage anything it touches and spawn more fire after 5 seconds. Problem is, it doesn't spawn any fire.
Instead, it gives me this error message:
runtime error: Cannot create objects of type /obj/fire. proc name: New (/obj/fire/New) usr: Timelimit (/mob/Mod/Admin) src: the fire (/obj/fire) call stack: the fire (/obj/fire): New(the woodfloor (8,38,1) (/turf/woodfloor))
|
It also gives me this when I log in, and my Login() proc is completely irrelevant to fire.
A: Remember to call the default action at the end of <code>New()</code> or nothing will be created!
B: As you currently have it, this will spawn an infinate loop of fire spawning. I would suggest making a /fire/spawned type, and overwriting the <code>New()</code> proc to not spawn the fire again.
C: Try new src.type(etc)