ID:261356
 
Hi I am trying to make the herb regrow when I get it thats not the problem look bellow.
get()
set src in oview(0)
view() << "[usr.name] gets a [src.name]."
Move(usr)
src:spawned+=1
if(src:spawned==1)
spawn(src:spawntime) new /obj/regrowfia1/fia1(locate(72,19,1))
see it will regrow the think with in the spawntime var now this is the problem the Eat() verb. When I eat it I have to del(src) but this cancles the Spawning of the new regrown herb. I try this
src.Move(locate(0,0,0))
src:timeremain=src:maxspawntime-src:spawntime
sleep(src:timeremain+1)
del(src)
Move it to 0,0,0 out of the invantory so u can see it and then take the remainding timer and add one to it so it wount del till after it is respaned. This still doesnt work thow cause It just get deleted I dont know how.

Can any one give me a new way of regrowing a herb while still being able to eat it and del(src).
As far as I know, del(src) shouldn't be canceling a spawn(), so something else is probably wrong. One thing I can tell you, though, is that locate(0,0,0) is a waste of time; that will always be null. And if you're calling Move(null), you might as well just say loc=null and do it quickly.

Lummox JR
First off, do me a favor and put lines between your writing and your code, it makes it so much easier to read :o)

Second, you might try not removing the herb you get at all. Just make a plant object with a get verb or something, and when it's gotten, create an edable herb object in the user's inventory, and make the plant invisible for a while then make it visible again.

Or, if visibility is a problem, just do that moving it to null and back isntead...

I hope that makes sense.