log
verb/Build_Fire()
set src in usr
var/obj/fire/F = new /obj/fire(get_step(usr,usr.dir))
usr << "[usr] kindled a fire."
spawn()F.timer(1000)
del src
However, I have ran into a few issues. I want to be able to craft say a chair, but I want it to require more than one piece of wood. I tried this code, but I get errors.
log
verb/Build_Fire()
set src in usr
var/obj/fire/F = new /obj/fire(get_step(usr,usr.dir))
usr << "[usr] kindled a fire."
spawn()F.timer(1000)
del src
log
verb/Build_Chair()
if(usr.log >= 2)
set src in usr
var/obj/item/chair/C = new/obj/item/chair(get_step(usr,usr.dir))
usr << "[usr] built a quaint chair."
spawn(C)
obj/fire
icon = 'icon.dmi'
icon_state = "fire"
luminosity = 3
density = 1
proc/timer(length)
sleep(length)
del src
obj/item
chair
icon = 'icon.dmi'
icon_state = "chair"
density = 0
The Chair code I am working on is the one with the verb Build_chair().
Anyway when I compile I get these errors.
loading RP.dme
Objects.dm:47:error: obj.log: undefined var
Objects.dm:62:error: : invalid expression
RP.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)
Line 62 is the obj/fire line. and error 47 is the (usr.log >= 2) in the build_chair() verb.
Thanks for your help,
Namone